#include <tDecorator.h>
Public Types | |
typedef DecoratedDerived::Decoratable_ | Decorated |
typedef for the class that is registered with the decorator system | |
Public Member Functions | |
tDecorator () | |
constructor, allocating the space | |
Decoration & | Get (Decorated &object) |
gets the decorator | |
Private Member Functions | |
virtual size_t | GetSize () const |
virtual void | Construct (void *decoration) const |
virtual void | Destruct (void *decoration) const |
Definition at line 244 of file tDecorator.h.
typedef DecoratedDerived::Decoratable_ tDecorator< DecoratedDerived, Decoration >::Decorated |
typedef for the class that is registered with the decorator system
Definition at line 248 of file tDecorator.h.
tDecorator< DecoratedDerived, Decoration >::tDecorator | ( | ) | [inline] |
constructor, allocating the space
Definition at line 251 of file tDecorator.h.
References tDecoratableManagerBase::AddDecorator(), and tDecoratableManager< Decorated >::GetManager().
00252 { 00253 tDecoratableManager< Decorated > & manager = tDecoratableManager< Decorated >::GetManager(); 00254 00255 // insert into management list 00256 manager.AddDecorator( *this ); 00257 }
Decoration& tDecorator< DecoratedDerived, Decoration >::Get | ( | Decorated & | object | ) | [inline] |
gets the decorator
Definition at line 260 of file tDecorator.h.
00261 { 00262 // pointer magic to get to the place of the decoration in decorator spacew 00263 char * endOfPointerSpace = static_cast< char * >( static_cast< void * >( &object ) ); 00264 char * allocatedSlot = endOfPointerSpace - offset_; 00265 Decoration * decoration = static_cast< Decoration * >( static_cast< void * >( allocatedSlot ) ); 00266 00267 return * decoration; 00268 }
virtual size_t tDecorator< DecoratedDerived, Decoration >::GetSize | ( | ) | const [inline, private, virtual] |
virtual void tDecorator< DecoratedDerived, Decoration >::Construct | ( | void * | decoration | ) | const [inline, private, virtual] |
Implements tDecoratorBase.
Reimplemented in tDecoratorPOD< DecoratedDerived, Decoration >.
Definition at line 272 of file tDecorator.h.
virtual void tDecorator< DecoratedDerived, Decoration >::Destruct | ( | void * | decoration | ) | const [inline, private, virtual] |