Object.h File Reference

#include "lidar/Atomic.h"

Go to the source code of this file.

Classes

class  Object
 Object is the base class for implementing reference counting. More...
class  Scoped< TYPE >
 Scoped is a wrapper class around Object that gives it block scoping. More...

Defines

#define ABSTRACT_OBJECT(classname)
 Macros for defining boilerplate parts of derived Object classes.
#define CONCRETE_OBJECT(classname)
 CONCRETE_OBJECT(): should be used when deriving classes that are concrete.
#define IMPLEMENT_OBJECT_CREATE(classname)   classname * classname::create(void) { return new classname; }

Functions

template<typename OBJECT >
static OBJECT * RETAIN (OBJECT *obj)
 Helper function for calling Object::retain().
template<typename OBJECT >
static void RELEASE (OBJECT *&obj)
 Helper function for calling Object::release().

Define Documentation

#define ABSTRACT_OBJECT ( classname   ) 
Value:
DISABLE_COPY(classname); \
   protected: \
      classname(void); \
      virtual ~classname(void)

ABSTRACT_OBJECT(): should be used when deriving classes that will not be instantiated directly. (TYPE::create() is not declared.)

Definition at line 45 of file Object.h.

#define CONCRETE_OBJECT ( classname   ) 
Value:
ABSTRACT_OBJECT(classname); \
   public: \
      static classname *create(void)

Definition at line 55 of file Object.h.

#define IMPLEMENT_OBJECT_CREATE ( classname   )     classname * classname::create(void) { return new classname; }

Definition at line 60 of file Object.h.


Function Documentation

template<typename OBJECT >
static void RELEASE ( OBJECT *&  obj  )  [inline, static]

RELEASE() tests for NULL before calling release() and set obj to NULL.

Definition at line 101 of file Object.h.

Referenced by Scoped< TYPE >::operator=(), and Scoped< TYPE >::~Scoped().

template<typename OBJECT >
static OBJECT* RETAIN ( OBJECT *  obj  )  [inline, static]

RETAIN() tests for NULL before calling retain() and returns obj.

Definition at line 90 of file Object.h.

Referenced by Scoped< TYPE >::operator=().


LizardTech