src/tools/tDecorator.cpp File Reference

#include "tDecorator.h"

Include dependency graph for tDecorator.cpp:

Go to the source code of this file.

Classes

class  base
class  derived
class  dummy

Functions

void test_decorators ()

Variables

static tDecoratorPOD< base, int > decorator (0)


Function Documentation

void test_decorators (  ) 

Definition at line 124 of file tDecorator.cpp.

00125            {};
00126 void test_decorators()
00127 {
00128     tASSERT( tIsDecoratable< base >::DECORATABLE );
00129     tASSERT( !tIsDecoratable< dummy >::DECORATABLE );
00130 
00131     base * p = new base;
00132     int * decoration = &decorator.Get( *p );
00133     delete p;
00134     p = new derived;
00135     decoration = &decorator.Get( *p );
00136     delete p;
00137 
00138     // shouldn't compile
00139     // tDecoratable decoratable;
00140 
00141     // tDecoratable * d2 = &decoratable;
00142     //        d2 = tNEW(tDecoratable);
00143     //        delete d2;
00144     //        d2 = new tDerivedDecoratable;


Variable Documentation

tDecoratorPOD< base, int > decorator(0) [static]

Referenced by GetQueryMessageStats().


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