//--------------------------------------------------------------------------- #include #include #include #include #include #include #pragma hdrstop #include "cell.h" #include "globals.h" //--------------------------------------------------------------------------- #pragma package(smart_init) float TCell::getApplaus() { return applaus; }; int TCell::isStanding() // 0-is not 1-is { return standing; }; TCell::TCell(pAuditory pa) { auditory=pa; neighbourList=new TCellList(); initialize(); // here is also for derived classed called TCell::initialize(); }; void TCell::initialize() { standing=0; applaus=0; nowStanding=0; nowApplaus=0; }; void TCell::set() { standing=nowStanding; applaus=nowApplaus; }; TCell::~TCell() // does not delete neighbours list, thus it can be shared { neighbourList->destroyList(); delete neighbourList; neighbourList=0; }; void TCell::addApplaus(void * pp) { ((Sum*)pp)->a+=getApplaus(); }; void TCell::addStanding(void * pp) { ((Count*)pp)->a+=isStanding(); }; void TCell::addNeighbour(pCell pc) { neighbourList->Add(pc); };