16#ifndef __albaObjectFactory_h
17#define __albaObjectFactory_h
29#define albaPlugObjectMacro(node_type,typeName) \
30 RegisterNewObject(node_type::GetStaticTypeName(), typeName, node_type::NewObject);
67 static std::list<albaObject *>
111 const char* className,
112 const char* subclassName);
116 const char* subclassName);
137 const char* overrideClassName,
138 const char* typeName,
158 virtual void Print(std::ostream& os,
const int indent=0)
const;
190 static void Initialize();
193 static void RegisterDefaults();
196 static void LoadDynamicFactories();
199 static void LoadLibrariesInPath(
const char*);
202 static std::list<albaObjectFactory*>* m_RegisteredFactories;
206 void* m_LibraryHandle;
207 unsigned long m_LibraryDate;
208 std::string m_LibraryPath;
albaObject *(* albaCreateObjectFunction)()
Hold a reference to a T instance.
albaIndent - a simple class to control print indentation.
Create instances of classes using an object factory.
virtual const char * GetALBASourceVersion(void) const =0
All sub-classes of albaObjectFactory should must return the version of ALBA they were built with.
static albaObject * CreateInstance(const char *classname)
Create and return an instance of the named object.
static void UnRegisterFactory(albaObjectFactory *)
Remove a factory from the list of registered factories.
virtual const char * GetDescription(void) const =0
Return a descriptive string describing the factory.
virtual void Print(std::ostream &os, const int indent=0) const
dump the object
static std::list< albaObjectFactory * > GetRegisteredFactories()
Return the list of all registered factories.
void RegisterOverride(const char *classOverride, const char *overrideClassName, const char *typeName, bool enableFlag, albaCreateObjectFunction createFunction, albaReferenceCounted *args=NULL)
Register object creation information with the factory.
const char * GetLibraryPath()
This returns the path to a dynamically loaded factory.
void RegisterNewObject(const char *ObjectName, const char *typeName, albaCreateObjectFunction createFunction, albaReferenceCounted *args=NULL)
This function can be used by Application code to register new Objects's to the albaCoreFactory.
static void RegisterFactory(albaObjectFactory *)
Register a factory so it can be used to create alba objects.
static void ReHash()
Re-check the ALBA_AUTOLOAD_PATH for new factory libraries.
virtual std::list< bool > GetEnableFlags()
Return a list of enable flags.
virtual std::list< std::string > GetClassOverrideNames()
Return a list of classes that this factory overrides.
virtual std::list< std::string > GetClassOverrideTypeNames()
Return a list of typeName for class overrides.
virtual void SetEnableFlag(bool flag, const char *className, const char *subclassName)
Set the Enable flag for the specific override of className.
virtual std::list< std::string > GetClassOverrideWithNames()
Return a list of the names of classes that override classes.
std::multimap< std::string, mmuOverrideInformation > mmuOverRideMap
albaStringOverMap - Internal implementation class for ObjectFactorBase.
virtual bool GetEnableFlag(const char *className, const char *subclassName)
Get the Enable flag for the specific override of className.
virtual void Disable(const char *className)
Set all enable flags for the given class to 0.
static std::list< albaObject * > CreateAllInstance(const char *classname)
Create and return all possible instances of the named object.
static void UnRegisterAllFactories()
Unregister all factories.
albaAbstractTypeMacro(albaObjectFactory, albaReferenceCounted)
Run-time type information (and related methods).
std::string GetObjectTypeName(const char *classname)
Returns the Object Type Name.
mmuOverRideMap * m_OverrideMap
albaReferenceCounted * GetFactoryArgs(const char *type_name)
internally used to retrieve args for this factory
virtual albaObject * CreateObject(const char *classname)
This method is provided by sub-classes of albaObjectFactory.
virtual ~albaObjectFactory()
albaReferenceCounted * GetArgs(const char *type_name)
return argument data assigned to object in the factory
Abstract superclass for all ALBA classes implementing RTTI APIs.
albaReferenceCounted - abstract base class for ALBA objects with reference counting.