zEffector Class Reference

#include <zEffector.h>

Inheritance diagram for zEffector:

Inheritance graph
[legend]
Collaboration diagram for zEffector:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 zEffector ()
 zEffector (zEffector const &other)
void operator= (zEffector const &other)
virtual zEffectorcopy (void) const
 overloaded assignment operator
virtual ~zEffector ()
void apply (gVectorExtra< ePlayerNetID * > &d_calculatedTargets)
virtual void effect (gVectorExtra< ePlayerNetID * > &d_calculatedTargets)
void setCount (int _count)
void setMessage (tString unformated)

Static Public Member Functions

static zEffectorcreate ()

Protected Member Functions

template<typename T>
pickOne (std::vector< T > const &sources)

Protected Attributes

int count
tOutput message


Detailed Description

Definition at line 41 of file zEffector.h.


Constructor & Destructor Documentation

zEffector::zEffector (  )  [inline]

Definition at line 45 of file zEffector.h.

Referenced by copy(), and create().

00045 :count(0),message() { }; //<! Constructor

Here is the caller graph for this function:

zEffector::zEffector ( zEffector const &  other  )  [inline]

Definition at line 46 of file zEffector.h.

00046 { };

virtual zEffector::~zEffector (  )  [inline, virtual]

Definition at line 49 of file zEffector.h.

00049 {};


Member Function Documentation

static zEffector* zEffector::create (  )  [inline, static]

Reimplemented in zEffectorWin, zEffectorDeath, zEffectorPoint, zEffectorCycleRubber, zEffectorCycleBrake, zEffectorCycleAcceleration, zEffectorSpawnPlayer, and zEffectorSetting.

Definition at line 44 of file zEffector.h.

References zEffector().

00044 { return new zEffector(); };

Here is the call graph for this function:

void zEffector::operator= ( zEffector const &  other  )  [inline]

Definition at line 47 of file zEffector.h.

Referenced by zEffectorSetting::operator=(), zEffectorSpawnPlayer::operator=(), zEffectorCycleBrake::operator=(), zEffectorCycleRubber::operator=(), zEffectorPoint::operator=(), zEffectorDeath::operator=(), and zEffectorWin::operator=().

00047 { this->zEffector::operator=(other); }; 

Here is the caller graph for this function:

virtual zEffector* zEffector::copy ( void   )  const [inline, virtual]

overloaded assignment operator

Reimplemented in zEffectorWin, zEffectorDeath, zEffectorPoint, zEffectorCycleRubber, zEffectorCycleBrake, zEffectorCycleAcceleration, zEffectorSpawnPlayer, and zEffectorSetting.

Definition at line 48 of file zEffector.h.

References zEffector().

00048 { return new zEffector(*this); };

Here is the call graph for this function:

void zEffector::apply ( gVectorExtra< ePlayerNetID * > &  d_calculatedTargets  ) 

Definition at line 33 of file zEffector.cpp.

References count, and effect().

00034 {
00035     if (count == -1 || count > 0) {
00036         effect(d_calculatedTargets);
00037         /*
00038         tOutput asdf;
00039         asdf.SetTemplateParameter(1, tString("33"));
00040         asdf.SetTemplateParameter(2, tString("bibibi"));
00041         asdf.Append(message);
00042         sn_ConsoleOut(asdf);
00043         */
00044         if (count > 0)
00045             count --;
00046     }
00047 }

Here is the call graph for this function:

virtual void zEffector::effect ( gVectorExtra< ePlayerNetID * > &  d_calculatedTargets  )  [inline, virtual]

Reimplemented in zEffectorWin, zEffectorDeath, zEffectorPoint, zEffectorCycleRubber, zEffectorCycleBrake, zEffectorCycleAcceleration, zEffectorSpawnPlayer, and zEffectorSetting.

Definition at line 52 of file zEffector.h.

Referenced by apply().

00052 { };

Here is the caller graph for this function:

void zEffector::setCount ( int  _count  )  [inline]

Definition at line 54 of file zEffector.h.

References count.

00054 {count = _count;};

void zEffector::setMessage ( tString  unformated  ) 

Definition at line 50 of file zEffector.cpp.

References message.

00051 {/*
00052                                               tString res;
00053                                               for (size_t i=0; i< unformated.Size(); i++)
00054                                                 {
00055                                                   char c = unformated(i);
00056                                                   if (c != '\\')
00057                                                 res += c;
00058                                                   else if (i < unformated.Size())
00059                                                 {
00060                                                   switch (unformated(i+1))
00061                                                     {
00062                                                     case 'n':
00063                                                       res += '\n';
00064                                                       i++;
00065                                                       break;
00066                                                     case '1':
00067                                                       res += '\1';
00068                                                       i++;
00069                                                       break;
00070                                                     default:
00071                                                       res += '\\';
00072                                                       break;
00073                                                     }
00074                                                 }
00075                                                 }
00076 
00077                                               message = res;
00078                                              */
00079     message << unformated;
00080     /*
00081     message.Append( unformated );
00082     message << unformated.c_str();
00083     message.Append( unformated.c_str());
00084     */
00085 }

template<typename T>
T zEffector::pickOne ( std::vector< T > const &  sources  )  [inline, protected]


Member Data Documentation

int zEffector::count [protected]

Definition at line 61 of file zEffector.h.

Referenced by apply(), and setCount().

tOutput zEffector::message [protected]

Definition at line 62 of file zEffector.h.

Referenced by zEffectorPoint::effect(), zEffectorWin::effect(), and setMessage().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:01:31 2008 for Armagetron Advanced by  doxygen 1.5.4