#include <igtlLightObject.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Public Member Functions | |
virtual Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const |
Static Public Member Functions | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
LightObject () | |
virtual | ~LightObject () |
volatile int | m_ReferenceCount |
SimpleFastMutexLock | m_ReferenceCountLock |
virtual void | PrintSelf (std::ostream &os) const |
virtual void | PrintHeader (std::ostream &os) const |
virtual void | PrintTrailer (std::ostream &os) const |
Light weight base class for most igtl classes.
LightObject is the highest level base class for most igtl objects. It implements reference counting and the API for object printing. It can be used as a lightweight base class in preference to Object. (LightObject does not support callbacks or modified time as Object does.) All IGTL objects should be a subclass of LightObject or Object with few exceptions (due to performance concerns).
Definition at line 58 of file igtlLightObject.h.
typedef SmartPointer<const Self> igtl::LightObject::ConstPointer |
Definition at line 64 of file igtlLightObject.h.
typedef SmartPointer<Self> igtl::LightObject::Pointer |
Definition at line 63 of file igtlLightObject.h.
typedef LightObject igtl::LightObject::Self |
Standard clas typedefs.
Definition at line 62 of file igtlLightObject.h.
|
inlineprotected |
Definition at line 118 of file igtlLightObject.h.
|
protectedvirtual |
|
static |
This method is called when igtlExceptionMacro executes. It allows the debugger to break on error.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented in igtl::Object.
|
virtual |
Delete an igtl object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.
|
inlinevirtual |
Return the name of this class as a string. Used by the object factory (implemented in New()) to instantiate objects of a named type. Also used for debugging and other output information.
Definition at line 84 of file igtlLightObject.h.
|
inlinevirtual |
Gets the reference count on this object.
Definition at line 110 of file igtlLightObject.h.
|
static |
Method for creation through the object factory.
void igtl::LightObject::Print | ( | std::ostream & | os | ) | const |
Cause the object to print itself out.
|
protectedvirtual |
Number of uses of this object by other objects.
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented in igtl::MultiThreader, igtl::Object, igtl::MutexLock, igtl::ObjectFactoryBase, igtl::Socket, igtl::FastMutexLock, igtl::TimeStamp, igtl::ServerSocket, and igtl::ClientSocket.
|
protectedvirtual |
Number of uses of this object by other objects.
|
virtual |
Increase the reference count (mark as used by another object).
Reimplemented in igtl::Object.
|
virtual |
Sets the reference count on this object. This is a dangerous method, use it with care.
Reimplemented in igtl::Object.
|
virtual |
Decrease the reference count (release by another object).
Reimplemented in igtl::Object.
|
mutableprotected |
Number of uses of this object by other objects.
Definition at line 131 of file igtlLightObject.h.
|
mutableprotected |
Mutex lock to protect modification to the reference count
Definition at line 134 of file igtlLightObject.h.