Object Class Reference

#include <Object.h>

Inherits Support.

Inherited by BrowserWindow, Config, Error, GetLine, License, NamedObject, Poller, SignalBase, Socket, Syslog, Telnet, Timer, and Url.

Inheritance diagram for Object:

Inheritance graph
[legend]
Collaboration diagram for Object:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void __abstract__ () const=0
 Object ()
virtual ~Object ()
ObjectId id () const
virtual int suspend ()
bool suspended () const
virtual int resume ()
int listMySignals (String &text)
int listMyRegistry (String &text)
void profBegin ()
void profEnd ()
unsigned long long cpuTime () const

Static Public Member Functions

static int get (const ObjectId id, Object **obj)
static int listObjects (String &text)
static int listSignals (String &text)
static int listRegistry (String &text)
static int listInstances (String &text)
static int listTop (String &text, const unsigned int itemsNum=LIMIT_OBJECT_TOP_ITEMS_NUM)

Static Public Attributes

static const ObjectId nid = 0

Protected Member Functions

void deleteLater (Object *obj)

Private Types

typedef map< ObjectId, Object * > ObjectList
typedef set< Object * > DefferedDeletionObjectList
typedef set< SignalBase * > SignalList
typedef map< String, RegistryBase * > RegistryList

Private Member Functions

int bindSignal (SignalBase *sgn)
int unbindSignal (SignalBase *sgn)

Static Private Member Functions

static int bindRegistry (Object *owner, RegistryBase *reg)
static int deletePostponed ()
static bool compareCpuTime (const Object *o1, const Object *o2)

Private Attributes

ObjectId _id
SignalList _signals
RegistryList _registryPrivate
bool _suspended
clock_t _cpuTimestamp
unsigned long long _cpuTime

Static Private Attributes

static ObjectList _objects
static DefferedDeletionObjectList _deferredDeletionObjects
static unsigned int _idCounter
static RegistryList _registryStatic

Friends

class Core
class SignalBase
class RegistryBase
class NamedObject

Detailed Description

Definition at line 61 of file Object.h.


Member Typedef Documentation

typedef map<ObjectId, Object *> Object::ObjectList [private]

Definition at line 108 of file Object.h.

typedef set<Object *> Object::DefferedDeletionObjectList [private]

Definition at line 109 of file Object.h.

typedef set<SignalBase *> Object::SignalList [private]

Definition at line 111 of file Object.h.

typedef map<String, RegistryBase *> Object::RegistryList [private]

Definition at line 112 of file Object.h.


Constructor & Destructor Documentation

Object::Object (  ) 

Definition at line 27 of file Object.cpp.

References _id, _idCounter, and _objects.

Object::~Object (  )  [virtual]

Definition at line 38 of file Object.cpp.

References _id, _objects, _signals, SignalBase::disconnect(), ERROR_BACKTRACE(), and FAILED().


Member Function Documentation

virtual void Object::__abstract__ (  )  const [pure virtual]

ObjectId Object::id (  )  const

Definition at line 56 of file Object.cpp.

References _id.

Referenced by deleteLater(), Signal< M >::disconnect(), listInstances(), listMyRegistry(), listMySignals(), listObjects(), listRegistry(), listSignals(), SignalBase::listSlots(), Timer::singleShot(), and S11n< T >::toString().

int Object::get ( const ObjectId  id,
Object **  obj 
) [static]

Definition at line 61 of file Object.cpp.

References _objects, ERROR, MSG_NULL_POINTER, MSG_OBJECT_INVALID_ID, MSG_OBJECT_NOT_FOUND, nid, and OK.

Referenced by Core::fork(), S11n< T >::fromString(), RegistryBase::getStr(), Core::kill(), Core::notify(), Core::resume(), RegistryBase::setStr(), Timer::singleShoot(), and Core::suspend().

int Object::suspend (  )  [virtual]

Reimplemented in ServiceBase, and Timer.

Definition at line 83 of file Object.cpp.

References _suspended, and OK.

Referenced by Timer::suspend(), ServiceBase::suspend(), and Core::suspend().

bool Object::suspended (  )  const

Definition at line 89 of file Object.cpp.

References _suspended.

Referenced by listInstances(), listObjects(), Timer::resume(), ServiceBase::resume(), Timer::shoot(), Timer::singleShoot(), Timer::suspend(), and ServiceBase::suspend().

int Object::resume (  )  [virtual]

Reimplemented in ServiceBase, and Timer.

Definition at line 94 of file Object.cpp.

References _suspended, and OK.

Referenced by Timer::resume(), ServiceBase::resume(), and Core::resume().

int Object::listObjects ( String text  )  [static]

Definition at line 100 of file Object.cpp.

References _objects, cpuTime(), CSTRING(), String::eol(), id(), OBJECT_COLOR_TITLE(), OK, String::sprintf(), and suspended().

int Object::listSignals ( String text  )  [static]

Definition at line 121 of file Object.cpp.

References _objects, CSTRING(), String::eol(), id(), SignalBase::name(), OBJECT_COLOR_TITLE(), OK, SIGNAL_BASE(), and String::sprintf().

int Object::listMySignals ( String text  ) 

Definition at line 142 of file Object.cpp.

References _signals, CSTRING(), String::eol(), id(), SignalBase::name(), OBJECT_COLOR_TITLE(), OK, and String::sprintf().

int Object::listRegistry ( String text  )  [static]

Definition at line 163 of file Object.cpp.

References _registryStatic, RegistryBase::accessMode(), CSTRING(), String::eol(), ERROR_BACKTRACE(), FAILED(), RegistryBase::hasGetter(), RegistryBase::hasSetter(), id(), NamedObject::name(), OBJECT_COLOR_TITLE(), OK, RegistryBase::persistency(), REG_ACCESS_MODE_SHIFT, REG_PERSISTENCY_SHIFT, REG_VISIBILITY_SHIFT, String::sprintf(), RegistryBase::toString(), and RegistryBase::visibility().

int Object::listMyRegistry ( String text  ) 

Definition at line 193 of file Object.cpp.

References _registryPrivate, RegistryBase::accessMode(), CSTRING(), String::eol(), ERROR_BACKTRACE(), FAILED(), RegistryBase::hasGetter(), RegistryBase::hasSetter(), id(), NamedObject::name(), OBJECT_COLOR_TITLE(), OK, RegistryBase::persistency(), REG_ACCESS_MODE_SHIFT, REG_PERSISTENCY_SHIFT, REG_VISIBILITY_SHIFT, String::sprintf(), RegistryBase::toString(), and RegistryBase::visibility().

int Object::listInstances ( String text  )  [static]

Reimplemented in Core.

Definition at line 223 of file Object.cpp.

References _objects, cpuTime(), CSTRING(), String::eol(), id(), NamedObject::name(), OBJECT_COLOR_TITLE(), OK, String::sprintf(), and suspended().

int Object::listTop ( String text,
const unsigned int  itemsNum = LIMIT_OBJECT_TOP_ITEMS_NUM 
) [static]

Definition at line 246 of file Object.cpp.

References _objects, compareCpuTime(), CSTRING(), String::eol(), MIN(), OBJECT_COLOR_TITLE(), OK, and String::sprintf().

void Object::profBegin (  ) 

Definition at line 274 of file Object.cpp.

References _cpuTimestamp.

void Object::profEnd (  ) 

Definition at line 279 of file Object.cpp.

References _cpuTime, _cpuTimestamp, and CLOCKS_PER_MSEC.

unsigned long long Object::cpuTime (  )  const

Definition at line 284 of file Object.cpp.

References _cpuTime.

Referenced by compareCpuTime(), listInstances(), and listObjects().

void Object::deleteLater ( Object obj  )  [protected]

Definition at line 291 of file Object.cpp.

References _deferredDeletionObjects, ERROR, id(), and MSG_OBJECT_ALREADY_REGISTERED_FOR_DEFERRED_DELETION.

Referenced by ServiceBase::kill().

int Object::bindSignal ( SignalBase sgn  )  [private]

Definition at line 303 of file Object.cpp.

References _signals, CSTRING(), ERROR, MSG_NULL_POINTER, MSG_OBJECT_SIGNAL_ALREADY_EXISTS, SignalBase::name(), and OK.

Referenced by SignalBase::bind().

int Object::unbindSignal ( SignalBase sgn  )  [private]

Definition at line 318 of file Object.cpp.

References _id, _signals, CSTRING(), ERROR, MSG_NULL_POINTER, MSG_OBJECT_SIGNAL_IS_NOT_CONNECTED, SignalBase::name(), and OK.

Referenced by SignalBase::unbind().

int Object::bindRegistry ( Object owner,
RegistryBase reg 
) [static, private]

Definition at line 333 of file Object.cpp.

References _registryPrivate, _registryStatic, CSTRING(), ERROR, MSG_NULL_POINTER, MSG_OBJECT_REGISTRY_ALREADY_EXISTS, NamedObject::name(), and OK.

Referenced by RegistryBase::bind().

int Object::deletePostponed (  )  [static, private]

Definition at line 349 of file Object.cpp.

References _deferredDeletionObjects, CSTRING(), DEBUG, and OK.

Referenced by Core::dispatch().

bool Object::compareCpuTime ( const Object o1,
const Object o2 
) [static, private]

Definition at line 369 of file Object.cpp.

References cpuTime().

Referenced by listTop().


Friends And Related Function Documentation

friend class Core [friend]

Reimplemented in Timer.

Definition at line 64 of file Object.h.

friend class SignalBase [friend]

Definition at line 65 of file Object.h.

friend class RegistryBase [friend]

Definition at line 66 of file Object.h.

friend class NamedObject [friend]

Reimplemented in Core.

Definition at line 67 of file Object.h.


Member Data Documentation

const ObjectId Object::nid = 0 [static]

Definition at line 73 of file Object.h.

Referenced by get().

Object::ObjectList Object::_objects [static, private]

Definition at line 123 of file Object.h.

Referenced by NamedObject::apropos(), get(), NamedObject::get(), Core::killAll(), listInstances(), listObjects(), listSignals(), listTop(), NamedObject::names(), Core::notifyAll(), Object(), Core::resumeAll(), Core::resumeTimers(), Core::suspendAll(), Core::suspendTimers(), and ~Object().

Object::DefferedDeletionObjectList Object::_deferredDeletionObjects [static, private]

Definition at line 124 of file Object.h.

Referenced by deleteLater(), and deletePostponed().

unsigned int Object::_idCounter [static, private]

Definition at line 125 of file Object.h.

Referenced by Object().

ObjectId Object::_id [private]

Definition at line 126 of file Object.h.

Referenced by id(), Object(), unbindSignal(), and ~Object().

SignalList Object::_signals [private]

Definition at line 127 of file Object.h.

Referenced by bindSignal(), listMySignals(), unbindSignal(), and ~Object().

Object::RegistryList Object::_registryStatic [static, private]

Definition at line 128 of file Object.h.

Referenced by bindRegistry(), RegistryBase::get(), and listRegistry().

RegistryList Object::_registryPrivate [private]

Definition at line 129 of file Object.h.

Referenced by bindRegistry(), RegistryBase::get(), and listMyRegistry().

bool Object::_suspended [private]

Definition at line 130 of file Object.h.

Referenced by resume(), suspend(), and suspended().

clock_t Object::_cpuTimestamp [private]

Definition at line 131 of file Object.h.

Referenced by profBegin(), and profEnd().

unsigned long long Object::_cpuTime [private]

Definition at line 132 of file Object.h.

Referenced by cpuTime(), and profEnd().


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 20:13:45 2007 for Pylon Application Platform by  doxygen 1.5.1