src/tools/tDecorator.h File Reference

#include "tMemManager.h"
#include "tLinkedList.h"
#include "tError.h"

Include dependency graph for tDecorator.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tDecoratableIndicator
 dummy class that decoratable objects have a dummy conversion operator to, so template magic can detect whether a class is decoratable or not More...
class  tIsDecoratable< Decorated >
 compile time test class that determines whether a class is decoratable More...
struct  tIsDecoratable< Decorated >::Ret
class  tDecoratorBase
 base class for decorators More...
class  tDecoratableManagerBase
 base class for managers of decorated classes More...
class  tDecoratableManager< Decorated >
 manager class for decoratable classes More...
struct  tDecoratableManager< Decorated >::tBoolToType<>
class  tDecorator< DecoratedDerived, Decoration >
 decorates a decoratable object with a decoration More...
class  tDecoratorPOD< DecoratedDerived, Decoration >

Defines

#define DECORATABLE(CLASS, BASE)
#define DECORATABLE_BASE(CLASS)   DECORATABLE(CLASS,int)


Define Documentation

#define DECORATABLE ( CLASS,
BASE   ) 

Value:

public:                                                        \
operator tDecoratableIndicator & () const;                     \
typedef BASE DecoratableBase_;                                 \
typedef CLASS Decoratable_;                                    \
void * operator new    ( size_t size ) THROW_BADALLOC          \
{                                                              \
    return tDecoratableManager< CLASS >::Allocate( size );     \
}                                                              \
void   operator delete ( void * ptr ) THROW_NOTHING            \
{                                                              \
    tDecoratableManager< CLASS >::Free( ptr);                  \
}                                                              \
void * operator new    (size_t size,const char * classn,const char * file,int line)  THROW_BADALLOC \
{                                                                                                   \
    return tDecoratableManager< CLASS >::Allocate( size, classn, file, line );                      \
}                                                                                                   \
void   operator delete (void * ptr,const char * classn, const char * file,int line)  THROW_NOTHING  \
{                                                                                                   \
    tDecoratableManager< CLASS >::Free( ptr, classn, file, line);                                   \
}                                                                                                   \
private:                                                                                            \
void * operator new[]   ( size_t size ) THROW_BADALLOC;                                             \
void   operator delete[]( void * old ) THROW_NOTHING;                                               \
void * operator new[]   (size_t size,const char *classn,const char * file,int line )  THROW_BADALLOC; \
void   operator delete[](void *ptr,const char *classname,const char * file,int line )  THROW_NOTHING; \
public:
macro making a class a decoratable class. If you end up on one of the macro usages in a debugger, just "step into" the function to get to the true implementation, the macro only is a dumb wrapper.

Definition at line 307 of file tDecorator.h.

Referenced by derived::~derived().

#define DECORATABLE_BASE ( CLASS   )     DECORATABLE(CLASS,int)

Definition at line 335 of file tDecorator.h.

Referenced by base::~base().


Generated on Sat Mar 15 23:11:28 2008 for Armagetron Advanced by  doxygen 1.5.4