#include <WorshiperInfo.h>
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. |
Definition at line 33 of file WorshiperInfo.h.
void WorshiperInfo::setWorshiperInfo | ( | const Worshiper * | w_info | ) |
Set the value of _w_info.
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 }
void WorshiperInfo::setWorshiperRequest | ( | const Worshiper * | w_request | ) |
Set the value of _w_request.
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 }
unsigned int WorshiperInfo::getSize | ( | ) | const |
Get the size of _w_info.
Definition at line 45 of file WorshiperInfo.cpp.
References _w_info, and Worshiper::getSize().
bool WorshiperInfo::isEnnemy | ( | ) | const |
Detect if _w_info is an ennemy.
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 }