ALBA
List of all members
albaAction Class Reference

#include <albaAction.h>

Inheritance diagram for albaAction:
Inheritance graph
[legend]
Collaboration diagram for albaAction:
Collaboration graph
[legend]
enum  ACTION_TYPE { SHARED_ACTION = 0 , EXCLUSIVE_ACTION }
 
typedef std::list< albaAutoPointer< albaDevice > > mmuDeviceList
 
int m_Type
 
std::list< albaAutoPointer< albaDevice > > m_Devices
 
 ALBA_ID_DEC (DEVICE_BIND)
 
 ALBA_ID_DEC (QUERY_CONNECTED_DEVICES)
 
 ALBA_ID_DEC (DEVICE_PLUGGED)
 
 ALBA_ID_DEC (DEVICE_UNPLUGGED)
 
 albaTypeMacro (albaAction, albaAgent)
 
int GetType ()
 
void SetType (int t)
 
void SetTypeToShared ()
 
void SetTypeToExclusive ()
 
void BindDevice (albaDevice *device)
 
void UnBindDevice (albaDevice *device)
 
void BindInteractor (albaInteractor *inter)
 
void UnBindInteractor (albaInteractor *inter)
 
const mmuDeviceListGetDevices ()
 
virtual int InternalStore (albaStorageElement *node)
 
virtual int InternalRestore (albaStorageElement *node)
 
virtual void OnEvent (albaEventBase *event)
 
 albaAction ()
 
virtual ~albaAction ()
 

Additional Inherited Members

- Public Member Functions inherited from albaAgent
 albaAbstractTypeMacro (albaAgent, albaReferenceCounted)
 
 ALBA_ID_DEC (AGENT_INITIALIZE)
 
void AddObserver (albaObserver *listener, albaID channel=MCH_UP)
 
void RemoveObserver (albaObserver *listener)
 
void RemoveAllObservers ()
 
virtual void OnEvent (albaEventBase *event)
 
bool HasObservers (albaID channel)
 
void GetObservers (albaID channel, std::vector< albaObserver * > &olist)
 
int Initialize ()
 
void Shutdown ()
 
int IsInitialized ()
 
virtual void SetName (const char *name)
 
const char * GetName ()
 
- 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)
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 
- Public Member Functions inherited from albaEventBroadcaster
 albaEventBroadcaster (void *owner=NULL)
 
virtual ~albaEventBroadcaster ()
 
 albaEventBroadcaster (const albaEventBroadcaster &c)
 
void AddObserver (albaObserver *obj)
 
void AddObserver (albaObserver &obj)
 
albaObserverCallbackAddObserverCallback (void(*f)(void *sender, albaID eid, void *clientdata, void *calldata))
 
bool RemoveObserver (albaObserver *obj)
 
void RemoveAllObservers ()
 
bool IsObserver (albaObserver *obj)
 
bool HasObservers ()
 
void GetObservers (std::vector< albaObserver * > &olist)
 
void InvokeEvent (albaEventBase &e)
 
void InvokeEvent (albaEventBase *e)
 
void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 
void SetChannel (albaID ch)
 
albaID GetChannel ()
 
virtual void SetListener (albaObserver *o)
 
- Public Member Functions inherited from albaEventSender
 albaEventSender ()
 
virtual void SetListener (albaObserver *o)
 
virtual albaObserverGetListener ()
 
virtual bool HasListener ()
 
virtual void InvokeEvent (albaEventBase &e)
 
virtual void InvokeEvent (albaEventBase *e)
 
virtual void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 
- Public Member Functions inherited from albaStorable
 albaStorable ()
 
int Store (albaStorageElement *element)
 
int Restore (albaStorageElement *element)
 
albaObjectCastToObject ()
 
bool IsStorable ()
 
- 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)
 
- Static Public Member Functions inherited from albaStorable
static albaStorableSafeCastToObject (albaObject *o)
 
- Protected Types inherited from albaEventBroadcaster
typedef std::list< albaObserver * > albaObserversList
 
- Protected Member Functions inherited from albaAgent
 albaAgent ()
 
virtual ~albaAgent ()
 
virtual int InternalInitialize ()
 
virtual void InternalShutdown ()
 
void InvokeEvent (albaEventBase &event, albaID channel=-1)
 
void InvokeEvent (albaEventBase *event, albaID channel=-1)
 
void InvokeEvent (void *sender, int id, albaID channel=MCH_UP, void *data=NULL)
 
virtual int InternalStore (albaStorageElement *node)=0
 
virtual int InternalRestore (albaStorageElement *node)=0
 
- Protected Attributes inherited from albaAgent
albaString m_Name
 
bool m_Initialized
 
std::vector< albaEventBroadcaster * > m_Channels
 
- Protected Attributes inherited from albaReferenceCounted
int m_ReferenceCount
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 
- Protected Attributes inherited from albaEventBroadcaster
albaObserversList m_Observers
 
albaID m_Channel
 
- Protected Attributes inherited from albaEventSender
albaObserverm_Listener
 
- Protected Attributes inherited from albaStorable
bool m_Storable
 

Detailed Description

Class used to route events from devices to interactors.

Definition at line 34 of file albaAction.h.

Member Typedef Documentation

◆ mmuDeviceList

force the action to bind to the device

Definition at line 50 of file albaAction.h.

Member Enumeration Documentation

◆ ACTION_TYPE

force the action to bind to the device

Enumerator
SHARED_ACTION 
EXCLUSIVE_ACTION 

Definition at line 44 of file albaAction.h.

Constructor & Destructor Documentation

◆ albaAction()

albaAction::albaAction ( )
protected

force the action to bind to the device

◆ ~albaAction()

virtual albaAction::~albaAction ( )
protectedvirtual

force the action to bind to the device

Member Function Documentation

◆ ALBA_ID_DEC() [1/3]

albaAction::ALBA_ID_DEC ( QUERY_CONNECTED_DEVICES  )

Issued by interactors to query for connected devices.

See also
ConnectedDeviceEvent

◆ ALBA_ID_DEC() [2/3]

albaAction::ALBA_ID_DEC ( DEVICE_PLUGGED  )

Issued by devices when connected to actions or when queried.

◆ ALBA_ID_DEC() [3/3]

albaAction::ALBA_ID_DEC ( DEVICE_UNPLUGGED  )

Issued by devices when connected to actions or when queried.

◆ albaTypeMacro()

albaAction::albaTypeMacro ( albaAction  ,
albaAgent   
)

force the action to bind to the device

◆ GetType()

int albaAction::GetType ( )
inline

Set the type of action.

Definition at line 55 of file albaAction.h.

◆ SetType()

void albaAction::SetType ( int  t)
inline

force the action to bind to the device

Definition at line 56 of file albaAction.h.

◆ SetTypeToShared()

void albaAction::SetTypeToShared ( )
inline

force the action to bind to the device

Definition at line 57 of file albaAction.h.

◆ SetTypeToExclusive()

void albaAction::SetTypeToExclusive ( )
inline

force the action to bind to the device

Definition at line 58 of file albaAction.h.

◆ BindDevice()

void albaAction::BindDevice ( albaDevice device)

Bind/Unbind a device to this action.

◆ UnBindDevice()

void albaAction::UnBindDevice ( albaDevice device)

force the action to bind to the device

◆ BindInteractor()

void albaAction::BindInteractor ( albaInteractor inter)

Bind/Unbind an interactor to this action.

◆ UnBindInteractor()

void albaAction::UnBindInteractor ( albaInteractor inter)

force the action to bind to the device

◆ GetDevices()

const mmuDeviceList * albaAction::GetDevices ( )
inline

Get list of devices assigned to this action.

Definition at line 69 of file albaAction.h.

◆ InternalStore()

virtual int albaAction::InternalStore ( albaStorageElement node)
virtual

Store of action's bindings to an XML file.

Implements albaStorable.

◆ InternalRestore()

virtual int albaAction::InternalRestore ( albaStorageElement node)
virtual

Restore of action's bindings from an XML file.

Implements albaStorable.

◆ OnEvent()

virtual void albaAction::OnEvent ( albaEventBase event)
virtual

Redefined to answer incoming queries about connected devices.

Reimplemented from albaAgent.

Member Data Documentation

◆ m_Type

int albaAction::m_Type
protected

force the action to bind to the device

Definition at line 84 of file albaAction.h.

◆ m_Devices

std::list<albaAutoPointer<albaDevice> > albaAction::m_Devices
protected

force the action to bind to the device

Definition at line 85 of file albaAction.h.


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