16#ifndef __albaInteractionFactory_h
17#define __albaInteractionFactory_h
22#include "albaConfigure.h"
26#define albaPlugDeviceMacro(node_type,descr) \
27 RegisterNewDevice(node_type::GetStaticTypeName(), descr, node_type::NewObject);
30#define albaPlugAvatarMacro(node_type,descr) \
31 RegisterNewAvatar(node_type::GetStaticTypeName(), descr, node_type::NewObject);
albaObject *(* albaCreateObjectFunction)()
Avatars are entities moving in the virtual world according to user's movements, and thus representing...
This abstract class manages function calls coming from devices and issue specific events to interacto...
Object factory for Devices and Avatars.
int GetNumberOfAvatars()
return number of devices registered to this factory
int GetNumberOfDevices()
return number of devices registered to this factory
void 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.
static albaInteractionFactory * GetInstance()
return the instance pointer of the factory.
static std::set< std::string > m_AvatarNames
static const std::set< std::string > * GetDeviceNames()
return list of names for nodes plugged into this factory
static std::set< std::string > m_DeviceNames
void 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.
~albaInteractionFactory()
static bool m_Initialized
const char * GetAvatarName(int idx)
return device name
static const std::set< std::string > * GetAvatarNames()
return list of names for nodes plugged into this factory
const char * GetDeviceTypeName(const char *device_name)
return the comment field of the device object plugged in the factory
albaTypeMacro(albaInteractionFactory, albaObjectFactory)
virtual const char * GetALBASourceVersion() const
All sub-classes of albaObjectFactory should must return the version of ALBA they were built with.
virtual const char * GetDescription() const
Return a descriptive string describing the factory.
static albaAvatar * CreateAvatarInstance(const char *type_name)
create an instance of the node give its type name
const char * GetDeviceName(int idx)
return device name
static albaDevice * CreateDeviceInstance(const char *type_name)
create an instance of the node give its type name
const char * GetAvatarDescription(const char *device_name)
return the comment field of the avatar object plugged in the factory
Create instances of classes using an object factory.
Plug a node in the main ALBA Avatar factory.
albaPlugAvatar(const char *description)
Plug a new Avatar class into the Avatar factory.
Plug a node in the main ALBA Device factory.
albaPlugDevice(const char *description)
Plug a new Device class into the Device factory.