Functions | |
| template<class T> | |
| std::vector< T * > | DigitalSpaces::GetFactoriesWithInterface () |
| A more C++ and friendly version of GetFactoriesWithInterface( const DUID*, DIObjectBaseList1*). | |
| template<class T> | |
| T * | DigitalSpaces::GetSingleFactoryWithInterface () |
| This is useful for the types of factory where there can only be one. | |
| DICore1 * | DigitalSpaces::GetCoreInterface () |
| Convenient version with the same functionality as GetSingleInterface< DICore1 >(). | |
| DICore1* DigitalSpaces::GetCoreInterface | ( | ) |
| std::vector<T*> DigitalSpaces::GetFactoriesWithInterface | ( | ) | [inline] |
A more C++ and friendly version of GetFactoriesWithInterface( const DUID*, DIObjectBaseList1*).
Converts from DIObjectBaseList1 to std::vector.
Example usage:
typdef std::vector< DigitalSpaces::DIDataResourceManager > resourceManagerVector;
resourceManagerVector resourceManagers = DigitalSpaces::GetFactoriesWithInterface< DigitalSpaces::DIDataResourceManager >();
for( resourceManagerVector::const_iterator itCurResourceManager = resourceManagers.begin(); itCurResourceManager != resourceManagers.end(); ++itCurResourceManager )
{
DigitalSpaces::DIDataResourceManager* pCurResourceManager = *itCurResourceManager;
pCurResourceManager->AddSearchPath("http://example.com/");
}
Referenced by DigitalSpaces::GetSingleFactoryWithInterface().
| T* DigitalSpaces::GetSingleFactoryWithInterface | ( | ) | [inline] |
This is useful for the types of factory where there can only be one.
A common example of this is DISGManager. When dealing with factories that could be implemented multiple times, e.g. DIResourceManager, use GetFactoriesWithInterface.
Example usage:
DigitalSpaces::DISGManager* pSGManager = DigitalSpaces::GetSingleFactoryWithInterface< DigitalSpaces::DISGManager >();
1.5.6