ALBA
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
albaInteractionFactory Class Reference

#include <albaInteractionFactory.h>

Inheritance diagram for albaInteractionFactory:
Inheritance graph
[legend]
Collaboration diagram for albaInteractionFactory:
Collaboration graph
[legend]

Public Member Functions

 albaTypeMacro (albaInteractionFactory, albaObjectFactory)
 
virtual const char * GetALBASourceVersion () const
 
virtual const char * GetDescription () const
 
void RegisterNewDevice (const char *node_name, const char *description, albaCreateObjectFunction createFunction)
 
const char * GetDeviceName (int idx)
 
int GetNumberOfDevices ()
 
const char * GetDeviceTypeName (const char *device_name)
 
void RegisterNewAvatar (const char *node_name, const char *description, albaCreateObjectFunction createFunction)
 
int GetNumberOfAvatars ()
 
const char * GetAvatarName (int idx)
 
const char * GetAvatarDescription (const char *device_name)
 
- Public Member Functions inherited from albaObjectFactory
 albaAbstractTypeMacro (albaObjectFactory, albaReferenceCounted)
 
virtual const char * GetALBASourceVersion (void) const =0
 
virtual const char * GetDescription (void) const =0
 
virtual std::list< std::string > GetClassOverrideNames ()
 
virtual std::list< std::string > GetClassOverrideWithNames ()
 
virtual std::list< std::string > GetClassOverrideTypeNames ()
 
virtual std::list< bool > GetEnableFlags ()
 
virtual void SetEnableFlag (bool flag, const char *className, const char *subclassName)
 
virtual bool GetEnableFlag (const char *className, const char *subclassName)
 
virtual void Disable (const char *className)
 
const char * GetLibraryPath ()
 
std::string GetObjectTypeName (const char *classname)
 
void RegisterNewObject (const char *ObjectName, const char *typeName, albaCreateObjectFunction createFunction, albaReferenceCounted *args=NULL)
 
void RegisterOverride (const char *classOverride, const char *overrideClassName, const char *typeName, bool enableFlag, albaCreateObjectFunction createFunction, albaReferenceCounted *args=NULL)
 
albaReferenceCountedGetArgs (const char *type_name)
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObjectFactory ()
 
virtual ~albaObjectFactory ()
 
- Public Member Functions inherited from albaReferenceCounted
 albaReferenceCounted ()
 
virtual ~albaReferenceCounted ()
 
 albaAbstractTypeMacro (albaReferenceCounted, albaObject)
 
virtual void Delete ()
 
void Register (void *obj)
 
virtual void UnRegister (void *obj)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 

Static Public Member Functions

static int Initialize ()
 
static albaInteractionFactoryGetInstance ()
 
static albaDeviceCreateDeviceInstance (const char *type_name)
 
static const std::set< std::string > * GetDeviceNames ()
 
static albaAvatarCreateAvatarInstance (const char *type_name)
 
static const std::set< std::string > * GetAvatarNames ()
 
- Static Public Member Functions inherited from albaObjectFactory
static albaObjectCreateInstance (const char *classname)
 
static std::list< albaObject * > CreateAllInstance (const char *classname)
 
static void ReHash ()
 
static void RegisterFactory (albaObjectFactory *)
 
static void UnRegisterFactory (albaObjectFactory *)
 
static void UnRegisterAllFactories ()
 
static std::list< albaObjectFactory * > GetRegisteredFactories ()
 
- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 

Protected Member Functions

 albaInteractionFactory ()
 
 ~albaInteractionFactory ()
 
- Protected Member Functions inherited from albaObjectFactory
virtual albaObjectCreateObject (const char *classname)
 
albaReferenceCountedGetFactoryArgs (const char *type_name)
 

Static Protected Attributes

static bool m_Initialized
 
static std::set< std::string > m_DeviceNames
 
static std::set< std::string > m_AvatarNames
 

Additional Inherited Members

- Protected Types inherited from albaObjectFactory
typedef std::multimap< std::string, mmuOverrideInformationmmuOverRideMap
 
- Protected Attributes inherited from albaObjectFactory
mmuOverRideMapm_OverrideMap
 
- Protected Attributes inherited from albaReferenceCounted
int m_ReferenceCount
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 

Detailed Description

Object factory for Devices and Avatars.

To make a new Device or Avatar available in the ALBA it must be plugged inside a factory, in particular this factory must be of type albaInteractionFactory to be able to retrieve the list of devices and avatars plugged inside the factory.

Definition at line 43 of file albaInteractionFactory.h.

Constructor & Destructor Documentation

◆ albaInteractionFactory()

albaInteractionFactory::albaInteractionFactory ( )
protected

◆ ~albaInteractionFactory()

albaInteractionFactory::~albaInteractionFactory ( )
inlineprotected

Definition at line 96 of file albaInteractionFactory.h.

Member Function Documentation

◆ albaTypeMacro()

albaInteractionFactory::albaTypeMacro ( albaInteractionFactory  ,
albaObjectFactory   
)

◆ GetALBASourceVersion()

virtual const char * albaInteractionFactory::GetALBASourceVersion ( ) const
virtual

All sub-classes of albaObjectFactory should must return the version of ALBA they were built with.

This should be implemented with the macro ALBA_SOURCE_VERSION and NOT a call to Version::GetALBASourceVersion. As the version needs to be compiled into the file as a string constant. This is critical to determine possible incompatible dynamic factory loads.

Implements albaObjectFactory.

◆ GetDescription()

virtual const char * albaInteractionFactory::GetDescription ( ) const
virtual

Return a descriptive string describing the factory.

Implements albaObjectFactory.

◆ Initialize()

static int albaInteractionFactory::Initialize ( )
static

◆ GetInstance()

static albaInteractionFactory * albaInteractionFactory::GetInstance ( )
static

return the instance pointer of the factory.

return NULL if not initialized yet

Referenced by albaPlugAvatar< T >::albaPlugAvatar(), and albaPlugDevice< T >::albaPlugDevice().

◆ CreateDeviceInstance()

static albaDevice * albaInteractionFactory::CreateDeviceInstance ( const char *  type_name)
static

create an instance of the node give its type name

◆ RegisterNewDevice()

void albaInteractionFactory::RegisterNewDevice ( const char *  node_name,
const char *  description,
albaCreateObjectFunction  createFunction 
)

This function can be used by Application code to register new Objects's to the mflCoreFactory.

Referenced by albaPlugDevice< T >::albaPlugDevice().

◆ GetDeviceNames()

static const std::set< std::string > * albaInteractionFactory::GetDeviceNames ( )
static

return list of names for nodes plugged into this factory

◆ GetDeviceName()

const char * albaInteractionFactory::GetDeviceName ( int  idx)

return device name

◆ GetNumberOfDevices()

int albaInteractionFactory::GetNumberOfDevices ( )

return number of devices registered to this factory

◆ GetDeviceTypeName()

const char * albaInteractionFactory::GetDeviceTypeName ( const char *  device_name)

return the comment field of the device object plugged in the factory

◆ CreateAvatarInstance()

static albaAvatar * albaInteractionFactory::CreateAvatarInstance ( const char *  type_name)
static

create an instance of the node give its type name

◆ RegisterNewAvatar()

void albaInteractionFactory::RegisterNewAvatar ( const char *  node_name,
const char *  description,
albaCreateObjectFunction  createFunction 
)

This function can be used by Application code to register new Objects's to the mflCoreFactory.

Referenced by albaPlugAvatar< T >::albaPlugAvatar().

◆ GetAvatarNames()

static const std::set< std::string > * albaInteractionFactory::GetAvatarNames ( )
static

return list of names for nodes plugged into this factory

◆ GetNumberOfAvatars()

int albaInteractionFactory::GetNumberOfAvatars ( )

return number of devices registered to this factory

◆ GetAvatarName()

const char * albaInteractionFactory::GetAvatarName ( int  idx)

return device name

◆ GetAvatarDescription()

const char * albaInteractionFactory::GetAvatarDescription ( const char *  device_name)

return the comment field of the avatar object plugged in the factory

Member Data Documentation

◆ m_Initialized

bool albaInteractionFactory::m_Initialized
staticprotected

Definition at line 98 of file albaInteractionFactory.h.

◆ m_DeviceNames

std::set<std::string> albaInteractionFactory::m_DeviceNames
staticprotected

Definition at line 100 of file albaInteractionFactory.h.

◆ m_AvatarNames

std::set<std::string> albaInteractionFactory::m_AvatarNames
staticprotected

Definition at line 101 of file albaInteractionFactory.h.


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