15 #include <tbb/concurrent_hash_map.h>
23 class DtKeyedDataUserData;
24 class DtTcsUserDataCreator;
48 bool myCreated =
false;
52 template<
class ClassToCreate,
class ...ConstructorArgs>
54 , ConstructorArgs&&... constructorArgs);
60 virtual void deleteUserData(
const void* userPointer);
73 template<
class ClassToCreate,
class ...ConstructorArgs>
75 , ConstructorArgs&&... constructorArgs)
78 UserDataHashTable::accessor accessor;
82 auto& entry = accessor->second;
83 entry = creator->
create(std::forward<ConstructorArgs>(constructorArgs)...);
87 if (tcsUserData ==
nullptr)
89 myDe.DT_LOG_WARN <<
"tcsUserData == nullptr" << std::endl << std::endl;
91 return { tcsUserData, inserted };
This represents an arbitrary user pointer/data within DtKeyedData.
Definition: DtKeyedData.h:95
static std::atomic< int > theCount
Definition: DtKeyedData.h:112
DtDe & myDe
Definition: DtKeyedData.h:63
virtual ClassToCreate * create(ConstructorArgs &&...constructorArgs)
Create a DtVirtualBaseClassCreator object, calls ClassToCreate constructor with myDe and ConstructorA...
Definition: DtVirtualBaseClassCreator.h:95
This class is used in conjunction with DtKeyedDataManagerTemplate. It represents data associated with...
Definition: DtKeyedData.h:30
UserDataHashTable myUserDataHashTable
Definition: DtKeyedData.h:66
Definition: DtKeyedData.h:45
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
const std::string myName
Definition: DtKeyedData.h:110
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
UserDataCreationResult getOrCreateUserData(const void *userPointer, DtVirtualBaseClassCreator< ClassToCreate, ConstructorArgs...> *creator, ConstructorArgs &&...constructorArgs)
get or create the tcs user data
Definition: DtKeyedData.h:74
DtDe & myDe
Definition: DtKeyedData.h:108
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
const std::string myName
Definition: DtKeyedData.h:68
static std::atomic< int > theCount
Definition: DtKeyedData.h:70
tbb::concurrent_hash_map< const void *, DtKeyedDataUserData * > UserDataHashTable
Definition: DtKeyedData.h:65
Contains DLL export macros.