![]() |
VR-Forces Developer's Guide
|
Manager for DtKeyedData Used to create/manage DtKeyedData Each entry of DtKeyedData is associated with a KeyType This key type can be a tuple like (camera, stream, thread id) Usage of this manager is thread safe.

Classes | |
| struct | FindResult |
| struct | TemplatedCreationResult |
Public Types | |
| enum | FlushKeysLocation { PRE_TICK = 0, POST_TICK = 1, NONE = 2 } |
Public Member Functions | |
| DtKeyedDataManagerTemplate (DtDe &de, FlushKeysLocation flushLocation) | |
| virtual | ~DtKeyedDataManagerTemplate () |
| virtual CreationResult | getOrCreate (const KeyType &key) |
| virtual DtKeyedData * | find (const KeyType &key) const |
| virtual void | forEachKeyedData (const std::function< void(DtKeyedData *)> &func) |
| virtual void | keyedDatas (std::vector< DtKeyedData * > &vecKeyedDatas) |
| template<class ClassToCreate , class... ConstructorArgs> | |
| TemplatedCreationResult < ClassToCreate > | getOrCreateUserData (const KeyType &key, const void *userPointer, DtVirtualBaseClassCreator< ClassToCreate, ConstructorArgs...> *creator, ConstructorArgs &&...constructorArgs) |
| template<class T > | |
| T * | findUserData (const KeyType &key, const void *userPointer, bool log=true) const |
| template<class T > | |
| FindResult< T > | findTcsDataAndUserData (const KeyType &key, const void *userPointer, bool log=true) const |
| virtual void | deleteTcsData (DtKeyedData *tcsData) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Public Attributes | |
| boost::signalslib::signal< void()> | signal_KeysDeleted |
Protected Types | |
| typedef tbb::concurrent_hash_map < KeyType, DtKeyedData *, KeyTypeHasher > | HashTable |
Protected Member Functions | |
| virtual void | slot_preTick () |
| virtual void | slot_postTick () |
| virtual void | flushInvalidKeys () |
Protected Attributes | |
| HashTable | myHashTable |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| tbb::concurrent_queue< KeyType > | myKeysToEraseScratchPad |
Private Member Functions | |
| DtKeyedDataManagerTemplate ()=delete | |
| DtKeyedDataManagerTemplate (const DtKeyedDataManagerTemplate &rhs)=delete | |
| DtKeyedDataManagerTemplate & | operator= (const DtKeyedDataManagerTemplate &rhs)=delete |
|
protected |
| enum makVrv::DtKeyedDataManagerTemplate::FlushKeysLocation |
| makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate | ( | DtDe & | de, |
| FlushKeysLocation | flushLocation | ||
| ) |
References makVrv::bind(), makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myConnections, makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myDe, makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::NONE, makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::POST_TICK, makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::PRE_TICK, makVrv::DtDe::signal_postTick, makVrv::DtDe::signal_preTick, makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::slot_postTick(), and makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::slot_preTick().
|
virtual |
destructor
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
virtual |
get or create the keyed data
Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::getOrCreateUserData().
|
virtual |
|
virtual |
call a function on each keyed data. Note: the call may happen in a different thread than the thread that called this function.
|
virtual |
Get the keyed datas.
|
inline |
get or create user data for a class T
References makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::getOrCreate(), makVrv::DtKeyedData::getOrCreateUserData(), makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::TemplatedCreationResult< T >::myCreated, and makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myDe.
|
inline |
find user data for a class T
References makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::find(), makVrv::DtKeyedData::findUserData(), and makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myDe.
|
inline |
find tcs data and user data for a class T
References makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::find(), makVrv::DtKeyedData::findUserData(), and makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myDe.
|
virtual |
Delete tcs data, if it exists. Will also delete the user datas, if any.
|
protectedvirtual |
pre tick function
Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate().
|
protectedvirtual |
post tick function
Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate().
|
protectedvirtual |
flush cameras that go out of the system
| boost::signalslib::signal<void()> makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::signal_KeysDeleted |
|
protected |
|
protected |
Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate(), makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::findTcsDataAndUserData(), makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::findUserData(), and makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::getOrCreateUserData().
|
protected |
manager for connections
Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate().
|
protected |