omegalib  13.1
omicron::Service Class Reference

The base class for Services: a Service has code that is executed periodically (in the poll method) and can generate and queue events to be read by the user or other services. More...

#include <Service.h>

Public Types

enum  ServiceType {
  Pointer = EventBase::ServiceTypePointer, Mocap = EventBase::ServiceTypeMocap, Keyboard = EventBase::ServiceTypeKeyboard, Controller = EventBase::ServiceTypeController,
  Ui = EventBase::ServiceTypeUi, Generic = EventBase::ServiceTypeGeneric, Brain = EventBase::ServiceTypeBrain, Wand = EventBase::ServiceTypeWand,
  Speech = EventBase::ServiceTypeSpeech
}
 This enumeration is kept for compatibility reason and may be removed in the future. More...
 
enum  ServicePollPriority { PollFirst, PollNormal, PollLast }
 

Public Member Functions

 Service ()
 
int getServiceId ()
 
virtual ~Service ()
 
ServiceManagergetManager ()
 
String getName ()
 
bool isInitialized ()
 
bool isDebugEnabled ()
 Returns true if debug mode is enabled for this service. More...
 
ServicePollPriority getPollPriority ()
 
void setPollPriority (ServicePollPriority value)
 
virtual void setup (Setting &settings)
 
virtual void initialize ()
 
virtual void start ()
 
virtual void poll ()
 
virtual void stop ()
 
virtual void dispose ()
 
void lockEvents ()
 
void unlockEvents ()
 
EventwriteHead ()
 
EventreadHead ()
 
EventreadTail ()
 
EventgetEvent (int index)
 
void doSetup (ServiceManager *mng, Setting &settings)
 
void doInitialize (ServiceManager *sm, int serviceId)
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Friends

class ServiceManager
 

Additional Inherited Members

- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 

Detailed Description

The base class for Services: a Service has code that is executed periodically (in the poll method) and can generate and queue events to be read by the user or other services.

+ Inheritance diagram for omicron::Service:

Member Enumeration Documentation

Enumerator
PollFirst 
PollNormal 
PollLast 

This enumeration is kept for compatibility reason and may be removed in the future.

To add new service types modify the relative enumeration in the EventBase class (connector/omicronConnectorClient.h)

Enumerator
Pointer 
Mocap 
Keyboard 
Controller 
Ui 
Generic 
Brain 
Wand 
Speech 

Constructor & Destructor Documentation

omicron::Service::Service ( )
inline
virtual omicron::Service::~Service ( )
inlinevirtual

Member Function Documentation

void omicron::Service::doInitialize ( ServiceManager sm,
int  serviceId 
)
void omicron::Service::doSetup ( ServiceManager mng,
Setting settings 
)
Event* omicron::Service::getEvent ( int  index)
ServiceManager * omicron::Service::getManager ( )
inline
String omicron::Service::getName ( )
inline
Service::ServicePollPriority omicron::Service::getPollPriority ( )
inline
int omicron::Service::getServiceId ( )
inline
bool omicron::Service::isDebugEnabled ( )
inline

Returns true if debug mode is enabled for this service.

bool omicron::Service::isInitialized ( )
inline
void omicron::Service::lockEvents ( )
Event* omicron::Service::readHead ( )
Event* omicron::Service::readTail ( )
void omicron::Service::setPollPriority ( Service::ServicePollPriority  value)
inline
virtual void omicron::Service::start ( )
inlinevirtual
virtual void omicron::Service::stop ( )
inlinevirtual
void omicron::Service::unlockEvents ( )
Event* omicron::Service::writeHead ( )

Friends And Related Function Documentation

friend class ServiceManager
friend

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