VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher > Class Template Reference

template<typename KeyType, typename KeyTypeHasher>
class makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >

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.

Inheritance diagram for makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >:
Inheritance graph
[legend]

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 DtKeyedDatafind (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
 
DtDemyDe
 
DtSignalConnectionManager myConnections
 
tbb::concurrent_queue< KeyType > myKeysToEraseScratchPad
 

Private Member Functions

 DtKeyedDataManagerTemplate ()=delete
 
 DtKeyedDataManagerTemplate (const DtKeyedDataManagerTemplate &rhs)=delete
 
DtKeyedDataManagerTemplateoperator= (const DtKeyedDataManagerTemplate &rhs)=delete
 

Member Typedef Documentation

template<typename KeyType , typename KeyTypeHasher >
typedef tbb::concurrent_hash_map< KeyType, DtKeyedData*, KeyTypeHasher> makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::HashTable
protected

Member Enumeration Documentation

template<typename KeyType , typename KeyTypeHasher >
enum makVrv::DtKeyedDataManagerTemplate::FlushKeysLocation
Enumerator
PRE_TICK 
POST_TICK 
NONE 

Constructor & Destructor Documentation

template<typename KeyType , typename KeyTypeHasher >
makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate ( DtDe de,
FlushKeysLocation  flushLocation 
)
template<typename KeyType , typename KeyTypeHasher >
makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::~DtKeyedDataManagerTemplate ( )
virtual

destructor

template<typename KeyType , typename KeyTypeHasher >
makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate ( )
privatedelete

not allowed

template<typename KeyType , typename KeyTypeHasher >
makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate ( const DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher > &  rhs)
privatedelete

not allowed

Member Function Documentation

template<typename KeyType , typename KeyTypeHasher >
DtKeyedDataManagerTemplate& makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::operator= ( const DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher > &  rhs)
privatedelete

not allowed

template<typename KeyType , typename KeyTypeHasher >
CreationResult makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::getOrCreate ( const KeyType &  key)
virtual
template<typename KeyType , typename KeyTypeHasher >
DtKeyedData * makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::find ( const KeyType &  key) const
virtual
template<typename KeyType , typename KeyTypeHasher >
void makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::forEachKeyedData ( const std::function< void(DtKeyedData *)> &  func)
virtual

call a function on each keyed data. Note: the call may happen in a different thread than the thread that called this function.

template<typename KeyType , typename KeyTypeHasher >
void makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::keyedDatas ( std::vector< DtKeyedData * > &  vecKeyedDatas)
virtual

Get the keyed datas.

template<typename KeyType , typename KeyTypeHasher >
template<class ClassToCreate , class... ConstructorArgs>
TemplatedCreationResult<ClassToCreate> makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::getOrCreateUserData ( const KeyType &  key,
const void *  userPointer,
DtVirtualBaseClassCreator< ClassToCreate, ConstructorArgs...> *  creator,
ConstructorArgs &&...  constructorArgs 
)
inline
template<typename KeyType , typename KeyTypeHasher >
template<class T >
T* makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::findUserData ( const KeyType &  key,
const void *  userPointer,
bool  log = true 
) const
inline
template<typename KeyType , typename KeyTypeHasher >
template<class T >
FindResult<T> makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::findTcsDataAndUserData ( const KeyType &  key,
const void *  userPointer,
bool  log = true 
) const
inline
template<typename KeyType , typename KeyTypeHasher >
void makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::deleteTcsData ( DtKeyedData tcsData)
virtual

Delete tcs data, if it exists. Will also delete the user datas, if any.

template<typename KeyType , typename KeyTypeHasher >
void makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::slot_preTick ( )
protectedvirtual
template<typename KeyType , typename KeyTypeHasher >
void makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::slot_postTick ( )
protectedvirtual
template<typename KeyType , typename KeyTypeHasher >
void makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::flushInvalidKeys ( void  )
protectedvirtual

flush cameras that go out of the system

Member Data Documentation

template<typename KeyType , typename KeyTypeHasher >
boost::signalslib::signal<void()> makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::signal_KeysDeleted
template<typename KeyType , typename KeyTypeHasher >
HashTable makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myHashTable
protected
template<typename KeyType , typename KeyTypeHasher >
DtDe& makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myDe
protected
template<typename KeyType , typename KeyTypeHasher >
DtSignalConnectionManager makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myConnections
protected
template<typename KeyType , typename KeyTypeHasher >
tbb::concurrent_queue<KeyType> makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::myKeysToEraseScratchPad
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)