WorshiperInfo Class Reference

#include <WorshiperInfo.h>

Collaboration diagram for WorshiperInfo:

Collaboration graph
[legend]

Public Member Functions

 WorshiperInfo ()
 Empty constructor.
virtual ~WorshiperInfo ()
 Empty destructor.
void setWorshiperInfo (const Worshiper *w_info)
 Set the value of _w_info.
void setWorshiperRequest (const Worshiper *w_request)
 Set the value of _w_request.
unsigned int getSize () const
 Get the size of _w_info.
bool isEnnemy () const
 Detect if _w_info is an ennemy.

Private Attributes

const Worshiper_w_info
 The worshiper the information of which we provide.
const Worshiper_w_request
 The worshiper who asks for information.

Detailed Description

< What the Worshipers can see of each others

Definition at line 33 of file WorshiperInfo.h.


Member Function Documentation

void WorshiperInfo::setWorshiperInfo ( const Worshiper w_info  ) 

Set the value of _w_info.

Parameters:
w_info new value of _w_info

Definition at line 37 of file WorshiperInfo.cpp.

References _w_info.

Referenced by VisualContext::getWorshipers().

00037                                                              {
00038   _w_info = w_info;
00039 }

Here is the caller graph for this function:

void WorshiperInfo::setWorshiperRequest ( const Worshiper w_request  ) 

Set the value of _w_request.

Parameters:
w_request new value of _w_request

Definition at line 41 of file WorshiperInfo.cpp.

References _w_request.

Referenced by VisualContext::getWorshipers().

00041                                                                    {
00042   _w_request = w_request;
00043 }

Here is the caller graph for this function:

unsigned int WorshiperInfo::getSize (  )  const

Get the size of _w_info.

Returns:
his size

Definition at line 45 of file WorshiperInfo.cpp.

References _w_info, and Worshiper::getSize().

00045                                           {
00046   return (_w_info != NULL ? _w_info->getSize() : 0);
00047 }

Here is the call graph for this function:

bool WorshiperInfo::isEnnemy (  )  const

Detect if _w_info is an ennemy.

Returns:
true if _w_info is an ennemy, false else

Definition at line 49 of file WorshiperInfo.cpp.

References _w_info, _w_request, and Worshiper::getColony().

00049                                    {
00050   return (_w_info != NULL && _w_info->getColony() != _w_request->getColony());
00051 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Feb 2 22:23:33 2008 for Teapot Colony Wars by  doxygen 1.5.4