MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
lti_referenceCountedObject.h File Reference
#include "lti_types.h"

Go to the source code of this file.

Classes

class  LTIReferenceCountedObject
 LTIReferenceCountedObject is a base class for implementing reference counting. More...
class  RC< TYPE >
 RC<> is a wrapper class around LTIReferenceCountedObject that gives the wrapped object block scoping. More...

Defines

#define LTI_REFERENCE_COUNTED_BOILERPLATE_BASE(classname)
 Macros for defining boilerplate parts of derived LTIReferenceCountedObject classes.
#define LTI_REFERENCE_COUNTED_BOILERPLATE(classname)

Functions

template<typename TYPE >
TYPE * LTI_RETAIN (TYPE *object)
 Helper functions that test if the object is NULL before calling retian() and release().
template<typename TYPE >
void LTI_RELEASE (TYPE *&object)
 Call release() on non-NULL objects and NULL out the pointer.
template<typename TYPE >
RC< TYPE > & LTI_RETAIN (RC< TYPE > &object)
 Call retain() on non-NULL objects.

Define Documentation

#define LTI_REFERENCE_COUNTED_BOILERPLATE (   classname)
Value:
LTI_REFERENCE_COUNTED_BOILERPLATE_BASE(classname); \
   public: \
      static classname *create(void)
Examples:
DerivedImageFilter.cpp, and DerivedImageReader.cpp.

Definition at line 51 of file lti_referenceCountedObject.h.

#define LTI_REFERENCE_COUNTED_BOILERPLATE_BASE (   classname)
Value:
LT_DISALLOW_COPY_CONSTRUCTOR(classname); \
   protected: \
      classname(void); \
      virtual ~classname(void)

LTI_REFERENCE_COUNTED_BOILERPLATE_BASE: shoudl be used when deriving class that will not be instantiated directly. (TYPE::create() is not declared.)

LTI_REFERENCE_COUNTED_BOILERPLATE: should be used when deriving classes that are concrete.

Definition at line 45 of file lti_referenceCountedObject.h.


Function Documentation

template<typename TYPE >
void LTI_RELEASE ( TYPE *&  object) [inline]

Definition at line 85 of file lti_referenceCountedObject.h.

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

template<typename TYPE >
TYPE* LTI_RETAIN ( TYPE *  object) [inline]

Call retain() on non-NULL objects

Definition at line 76 of file lti_referenceCountedObject.h.

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

template<typename TYPE >
RC<TYPE>& LTI_RETAIN ( RC< TYPE > &  object) [inline]

Definition at line 156 of file lti_referenceCountedObject.h.