#include <structure.h>
Inheritance diagram for Structure:
Public Member Functions | |
Structure (const OPENCITY_STRUCTURE_CODE enumStructCode) | |
Structure (const OPENCITY_STRUCTURE_CODE enumStructCode, Structure *pMain) | |
void | SaveTo (std::fstream &rfs) |
void | LoadFrom (std::fstream &rfs) |
void | Set (const uint wegBit) |
void | Unset (const uint wegBit) |
const bool | IsSet (const uint wegBit) const |
const OPENCITY_GRAPHIC_CODE | GetGraphicCode () const |
const OPENCITY_GRAPHIC_CODE | GetBaseGraphicCode () const |
virtual const OPENCITY_GRAPHIC_CODE | GetNextLevelGraphicCode () const |
virtual const OPENCITY_GRAPHIC_CODE | GetPreviousLevelGraphicCode () const |
const OPENCITY_STRUCTURE_CODE | GetCode () const |
Structure * | GetMain () const |
void | SetMain (Structure *const pstruct) |
virtual const bool | LevelUp () |
virtual const bool | LevelDown () |
const uint | GetLevel () const |
void | SetLevel (const uint uiLevel) |
const OPENCITY_STRUCTURE_TYPE | GetType () const |
Static Public Member Functions | |
static const uint & | GetNumber () |
static void | SetNumber (const uint &rcuiNb) |
Protected Attributes | |
OPENCITY_GRAPHIC_CODE | _eGC |
Graphic code. | |
OPENCITY_STRUCTURE_CODE | _eSC |
Structure code. | |
OPENCITY_STRUCTURE_TYPE | _eType |
Structure type. | |
uint | _uiStatus |
uint | _uiLevel |
Structure * | _pstructureMain |
Static Private Attributes | |
static uint | uiNumberStructure = 0 |
The total of the structures created so far. |
Definition at line 44 of file structure.h.
|
Returns the first base GRAPHIC_CODE of the structure depending on its structure type Definition at line 174 of file structure.cpp. References _eSC. Referenced by RCIStructure::GetNextLevelGraphicCode(), and RCIStructure::GetPreviousLevelGraphicCode(). |
|
Returns the current STRUCTURE_CODE of the structure. This is different from the GRAPHIC_CODE. The structure code is the _type_ of the structure where as the graphic code defines the model which is displayed by the renderer. Definition at line 222 of file structure.cpp. References _eSC. Referenced by BuildingLayer::_BuildPathStructure(), BuildingLayer::_DestroyStructure(), Simulator::CheckLevelDown(), Simulator::CheckLevelUp(), BuildingLayer::ContainStructure(), BuildingLayer::ContainStructureOnly(), PathFinder::findShortestPath(), BuildingLayer::GetRandomStructure(), MainSim::RefreshSimValue(), and BuildingLayer::ResizeStructure(). |
|
Returns the current GRAPHIC_CODE of the structure Definition at line 166 of file structure.cpp. References _eGC. Referenced by BuildingLayer::_DestroyStructure(), BuildingLayer::_LoadStructure(), Simulator::CheckLevelDown(), Simulator::CheckLevelUp(), GraphicManager::DisplayStructure(), and BuildingLayer::ResizeStructure(). |
|
Returns the GRAPHIC_CODE of the next level Reimplemented in RCIStructure. Definition at line 203 of file structure.cpp. References _eGC. Referenced by Simulator::CheckLevelUp(). |
|
Return the number of structures created so far
Definition at line 31 of file structure.cpp. References uiNumberStructure. Referenced by Simulator::RCIDelay(). |
|
Returns the GRAPHIC_CODE of the previous level Reimplemented in RCIStructure. Definition at line 213 of file structure.cpp. References _eGC. Referenced by Simulator::CheckLevelDown(). |
|
The type of the structure is useful for un/serialization Definition at line 290 of file structure.cpp. References _eType. Referenced by BuildingLayer::SaveTo(). |
|
Load the data from the specified stream
Implements Persistence. Reimplemented in PathStructure. Definition at line 121 of file structure.cpp. References _eGC, _eSC, and _eType. Referenced by PathStructure::LoadFrom(), and BuildingLayer::LoadFrom(). |
|
Save the data to the specified fstream
Implements Persistence. Reimplemented in PathStructure. Definition at line 107 of file structure.cpp. References _eGC, _eSC, and _eType. Referenced by PathStructure::SaveTo(), and BuildingLayer::SaveTo(). |
|
Set the properties of the structure to wegBit
Definition at line 136 of file structure.cpp. Referenced by PathFinder::findShortestPath(), and BuildingLayer::StructureSet(). |
|
Set the number of created structures
Definition at line 39 of file structure.cpp. References uiNumberStructure. Referenced by BuildingLayer::LoadFrom(). |
|
Pointer of the main structure IF this is just a part of a bigger structure ELSE equal to NULL Definition at line 194 of file structure.h. |