#include <OSGThreadManager.h>
Types | |
| typedef MPFieldTypeMap::iterator | MPFieldTypeMapIt |
| typedef MPFieldTypeMap::const_iterator | MPFieldTypeMapCIt |
| typedef std::map< IDStringLink, MPFieldT * > | MPFieldMap |
| typedef MPFieldMap::iterator | MPFieldMapIt |
| *typedef std::map< IDStringLink, MPFieldType * > | MPFieldTypeMap |
Public Types | |
| typedef MPFieldT::Type | MPFieldType |
Public Member Functions | |
Constructor | |
| * | MPFieldStore (void) |
Destructor | |
| *virtual | ~MPFieldStore (void) |
Get | |
| *MPFieldT * | getMPField (const Char8 *szName, const Char8 *szTypeName) |
| MPFieldT * | findMPField (const Char8 *szName) |
| void | removeMPField (MPFieldT *pField) |
Helper | |
| *void | clear (void) |
Find | |
| *MPFieldType * | findMPFieldType (const Char8 *szName) const |
Protected Member Functions | |
| UInt32 | registerMPType (MPFieldType *pType) |
Protected Attributes | |
| MPFieldTypeMap | _mFieldTypeMap |
| MPFieldMap | _mFieldMap |
Private Member Functions | |
| MPFieldStore (const MPFieldStore &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const MPFieldStore &source) |
| prohibit default function (move to 'public' if needed) | |
Friends | |
| class | ThreadManager |
Definition at line 72 of file OSGThreadManager.h.
|
|||||
|
Definition at line 78 of file OSGThreadManager.h. |
|
|||||
|
Definition at line 129 of file OSGThreadManager.h. |
|
|||||
|
Definition at line 131 of file OSGThreadManager.h. |
|
|||||
|
Definition at line 133 of file OSGThreadManager.h. |
|
|||||
|
Definition at line 134 of file OSGThreadManager.h. |
|
||||||||||
|
Definition at line 54 of file OSGThreadManager.inl.
|
|
||||||||||
|
Definition at line 61 of file OSGThreadManager.inl.
|
|
||||||||||
|
|
|
||||||||||||||||
|
Definition at line 68 of file OSGThreadManager.inl. References osg::MPFieldStore< MPFieldT >::_mFieldMap, osg::MPFieldStore< MPFieldT >::findMPField(), osg::MPFieldStore< MPFieldT >::findMPFieldType(), and PWARNING. Referenced by osg::ThreadManager::getBarrier(), osg::ThreadManager::getLock(), osg::ThreadManager::getLockPool(), and osg::ThreadManager::init(). 00070 { 00071 MPFieldT *returnValue = NULL; 00072 MPFieldType *pElemType; 00073 00074 returnValue = findMPField(szName); 00075 00076 if(returnValue == NULL) 00077 { 00078 pElemType = findMPFieldType(szTypeName); 00079 00080 if(pElemType != NULL) 00081 { 00082 returnValue = pElemType->create(szName); 00083 00084 if(returnValue != NULL) 00085 { 00086 _mFieldMap[IDStringLink(returnValue->getCName())]= returnValue; 00087 } 00088 } 00089 else 00090 { 00091 PWARNING << "could not find type named : " << szName << std::endl; 00092 00093 returnValue = NULL; 00094 } 00095 } 00096 00097 return returnValue; 00098 }
|
|
||||||||||
|
Definition at line 104 of file OSGThreadManager.inl. References osg::MPFieldStore< MPFieldT >::_mFieldMap. Referenced by osg::ThreadManager::findBarrier(), osg::ThreadManager::findLock(), osg::ThreadManager::findLockPool(), and osg::MPFieldStore< MPFieldT >::getMPField(). 00105 { 00106 MPFieldMapIt gIt; 00107 00108 if(szName == NULL) 00109 return NULL; 00110 00111 gIt = _mFieldMap.find(IDStringLink(szName)); 00112 00113 if(gIt != _mFieldMap.end()) 00114 { 00115 return (*gIt).second; 00116 } 00117 else 00118 { 00119 return NULL; 00120 } 00121 }
|
|
||||||||||
|
Definition at line 124 of file OSGThreadManager.inl. References osg::MPFieldStore< MPFieldT >::_mFieldMap. Referenced by osg::ThreadManager::removeBarrier(), osg::ThreadManager::removeLock(), and osg::ThreadManager::removeLockPool(). 00125 { 00126 if(pField == NULL) 00127 return; 00128 00129 MPFieldMapIt gIt = _mFieldMap.find(IDStringLink(pField->getCName())); 00130 00131 if(gIt != _mFieldMap.end()) 00132 { 00133 _mFieldMap.erase(gIt); 00134 } 00135 }
|
|
||||||||||
|
Definition at line 141 of file OSGThreadManager.inl. References osg::MPFieldStore< MPFieldT >::_mFieldMap. Referenced by osg::ThreadManager::shutdown(). 00142 { 00143 MPFieldMapIt gIt = _mFieldMap.begin(); 00144 00145 while(gIt != _mFieldMap.end()) 00146 { 00147 delete (*gIt).second; 00148 00149 ++gIt; 00150 } 00151 00152 _mFieldMap.clear(); 00153 }
|
|
||||||||||
|
Definition at line 158 of file OSGThreadManager.inl. References osg::MPFieldStore< MPFieldT >::_mFieldTypeMap, and SWARNING. Referenced by osg::MPFieldStore< MPFieldT >::getMPField(), and osg::MPFieldStore< MPFieldT >::registerMPType(). 00159 { 00160 MPFieldTypeMapCIt gIt; 00161 00162 if(szName == NULL) 00163 { 00164 SWARNING << "typename == NULL" << std::endl; 00165 return NULL; 00166 } 00167 00168 gIt = _mFieldTypeMap.find(IDStringLink(szName)); 00169 00170 if(gIt != _mFieldTypeMap.end()) 00171 { 00172 return (*gIt).second; 00173 } 00174 else 00175 { 00176 return NULL; 00177 } 00178 }
|
|
||||||||||
|
Definition at line 184 of file OSGThreadManager.inl. References osg::MPFieldStore< MPFieldT >::_mFieldTypeMap, osg::MPFieldStore< MPFieldT >::findMPFieldType(), and SLOG. Referenced by osg::ThreadManager::registerBarrierType(), osg::ThreadManager::registerLockPoolType(), and osg::ThreadManager::registerLockType(). 00185 { 00186 UInt32 returnValue = 0; 00187 00188 if(pType == NULL) 00189 return 0; 00190 00191 MPFieldType *pTmp = findMPFieldType(pType->getCName()); 00192 00193 if(pTmp != NULL) 00194 { 00195 SLOG << "Error could not add second mp type with name " 00196 << pType->getCName() 00197 << std::endl; 00198 00199 return returnValue; 00200 } 00201 00202 /* 00203 returnValue = TypeFactory::the()->registerType(pType); 00204 00205 if(returnValue == 0) 00206 { 00207 SLOG << "Error in base type registration" << std::endl; 00208 return returnValue; 00209 } 00210 */ 00211 00212 _mFieldTypeMap[IDStringLink(pType->getCName())] = pType; 00213 00214 return returnValue; 00215 }
|
|
||||||||||
|
|
|
|||||
|
Definition at line 148 of file OSGThreadManager.h. |
|
|||||
|
Definition at line 128 of file OSGThreadManager.h. |
|
|||||
|
Definition at line 139 of file OSGThreadManager.h. Referenced by osg::MPFieldStore< MPFieldT >::findMPFieldType(), and osg::MPFieldStore< MPFieldT >::registerMPType(). |
|
|||||
|
Definition at line 140 of file OSGThreadManager.h. Referenced by osg::MPFieldStore< MPFieldT >::clear(), osg::MPFieldStore< MPFieldT >::findMPField(), osg::MPFieldStore< MPFieldT >::getMPField(), and osg::MPFieldStore< MPFieldT >::removeMPField(). |
1.4.3