#include "pxr/pxr.h"
#include "pxr/imaging/hd/api.h"
#include "pxr/imaging/hd/dataSourceLocator.h"
#include "pxr/base/tf/token.h"
#include "pxr/base/vt/value.h"
#include <iosfwd>
#include <memory>
#include <vector>
#include <atomic>
Go to the source code of this file.
#define HD_DECLARE_DATASOURCE |
( |
|
type | ) |
|
Value:
template <typename ... Args> \
}
#define HD_DECLARE_DATASOURCE_ABSTRACT(type)
**If you just want to fire and args
HD_DECLARE_DATASOURCE Used for instantiable classes, this defines functions for manipulating and allocating handles to this type of datasource.
Use of this macro in derived classes is important to make sure that core and client code share the same handle type and allocator.
Definition at line 69 of file dataSource.h.
#define HD_DECLARE_DATASOURCE_ABSTRACT |
( |
|
type | ) |
|
Value:using Handle = std::shared_ptr<type>; \
using AtomicHandle =
Handle; \
static
Handle AtomicLoad(AtomicHandle &
ptr) { \
return std::atomic_load(&ptr); \
} \
static
void AtomicStore(AtomicHandle &
ptr,
const Handle &
v) { \
std::atomic_store(&ptr, v); \
} \
static
bool AtomicCompareExchange(AtomicHandle &
ptr, \
AtomicHandle &expected, \
return std::atomic_compare_exchange_strong(&ptr, &expected, desired); \
} \
return std::dynamic_pointer_cast<
type>(
v); \
}
HD_DECLARE_DATASOURCE_ABSTRACT Used for non-instantiable classes, this defines a set of functions for manipulating handles to this type of datasource.
Definition at line 45 of file dataSource.h.
#define HD_DECLARE_DATASOURCE_HANDLES |
( |
|
type | ) |
|
Value:
using
type##AtomicHandle = type::AtomicHandle;
Definition at line 84 of file dataSource.h.
#define HD_DECLARE_DATASOURCE_INITIALIZER_LIST_NEW |
( |
|
type, |
|
|
|
T |
|
) |
| |
Value:static Handle New(std::initializer_list<T> initList) { \
}
HD_DECLARE_DATASOURCE_INITIALIZER_LIST_NEW Used for declaring a New
function for datasource types that have a constructor that takes an initializer_list<T>.
Definition at line 79 of file dataSource.h.
HD_API void HdDebugPrintDataSource |
( |
std::ostream & |
, |
|
|
HdDataSourceBaseHandle |
, |
|
|
int |
indentLevel = 0 |
|
) |
| |
Print a datasource to a stream, for debugging/testing.
HD_API void HdDebugPrintDataSource |
( |
HdDataSourceBaseHandle |
, |
|
|
int |
indentLevel = 0 |
|
) |
| |
Print a datasource to stdout, for debugging/testing.
Merges contributing sample times from several data sources.