Factory access
[Implementations]


Detailed Description

These are functions used to access the "factory" objects (exported via DIComponentInfo / GetComponentInfo) of other components.


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.
DICore1DigitalSpaces::GetCoreInterface ()
 Convenient version with the same functionality as GetSingleInterface< DICore1 >().

Function Documentation

DICore1* DigitalSpaces::GetCoreInterface (  ) 

Convenient version with the same functionality as GetSingleInterface< DICore1 >().

See also:
DICore1

template<class T>
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().

template<class T>
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 >();


Generated on Sun Aug 31 17:46:27 2008 for Digital Spaces by  doxygen 1.5.6