#include <layer.h>
Inheritance diagram for Layer:

Public Member Functions | |
| virtual const bool | IsConstructive (uint W1, uint L1, uint W2, uint L2, const OPENCITY_STRUCTURE_CODE &enumStructCode) const =0 |
| virtual const OPENCITY_ERR_CODE | BuildPreview (const uint &W, const uint &L, const OPENCITY_STRUCTURE_CODE &enumStructCode, OPENCITY_GRAPHIC_CODE &enumGraphicCode) const =0 |
| virtual const OPENCITY_ERR_CODE | BuildStructure (const uint &W1, const uint &L1, const uint &W2, const uint &L2, const OPENCITY_STRUCTURE_CODE &enumStructCode, uint &rCost)=0 |
| virtual const OPENCITY_ERR_CODE | ResizeStructure (const uint &w, const uint &l, const OPENCITY_GRAPHIC_CODE &oldGC)=0 |
| virtual const OPENCITY_ERR_CODE | DestroyStructure (uint W1, uint L1, uint W2, uint L2, uint &rCost)=0 |
| virtual Structure * | GetLinearStructure (const uint cuiLinearIndex) const =0 |
| virtual Structure * | GetStructure (const uint &w, const uint &l) const =0 |
| virtual Structure * | GetRandomStructure (uint &w, uint &l, const OPENCITY_STRUCTURE_CODE &enumStructCode=OC_STRUCTURE_UNDEFINED) const =0 |
| virtual const uint | GetNumberStructure () const =0 |
| const uint | GetMaxLinear () const |
| void | GetLayerSize (uint &w, uint &l) const |
| virtual void | StructureSet (const OC_BYTE &status)=0 |
| virtual void | StructureUnset (const OC_BYTE &status)=0 |
| virtual const bool | ContainStructure (const uint &W1, const uint &L1, const uint &W2, const uint &L2, const OPENCITY_STRUCTURE_CODE &enumStructCode) const =0 |
| virtual const bool | ContainStructureOnly (const uint &W1, const uint &L1, const uint &W2, const uint &L2, const OPENCITY_STRUCTURE_CODE &enumStructCode) const =0 |
| virtual GUIContainer * | QueryStructure (const uint &w, const uint &l) const =0 |
Protected Attributes | |
| uint | _uiLayerWidth |
| uint | _uiLayerLength |
Static Protected Attributes | |
| static uint | uiNumberLayer = 0 |
| total derived classes | |
| static GUIButton * | pbtnQW |
| Water query button. | |
| static GUIButton * | pbtnQE |
| Electricity query button. | |
| static GUIButton * | pbtnQG |
| Gas query button. | |
| static GUIButton * | pbtnQR |
| Residential query button. | |
| static GUIButton * | pbtnQC |
| Commercial query button. | |
| static GUIButton * | pbtnQI |
| Industrial query button. | |
| static GUIButton * | pbtnQP |
| Path query button. | |
Definition at line 37 of file layer.h.
|
||||||||||||||||||||
|
Preview the structure which is about to be built on the specified surface.
Implemented in BuildingLayer. |
|
||||||||||||||||||||||||||||
|
Build the specified structure on the surface Precondition: the specified surface must be "constructive". This is checked by the method "IsConstructive()"
Implemented in BuildingLayer. |
|
||||||||||||||||||||||||
|
Does the specified surface contain _at least_ one required structure ? Implemented in BuildingLayer. Referenced by Map::ChangeHeight(). |
|
||||||||||||||||||||||||
|
Does the specified surface contain _only_ the required structure or nothing ? Implemented in BuildingLayer. |
|
||||||||||||||||||||||||
|
Destroy _all_ the structures built on the surface. If the specified surface is a part of a bigger structure, the big main structure is also destroyed. Implemented in BuildingLayer. |
|
||||||||||||
|
Get the layer size.
Definition at line 88 of file layer.cpp. Referenced by Simulator::CheckLevelDown(), and Simulator::CheckLevelUp(). |
|
|
Fast access to the structure by its internal linear index. There's no error checking.
Implemented in BuildingLayer. Referenced by Renderer::Display(). |
|
|
Get the number of the structures built on the layer Implemented in BuildingLayer. |
|
||||||||||||||||
|
Random access to the structure of the specified type
Implemented in BuildingLayer. |
|
||||||||||||
|
Access to the structure specified by its WL coordinates
Implemented in BuildingLayer. |
|
||||||||||||||||||||||||
|
Is the surface ( w1, l1, w2, l2 ) constructive ? Is there something built on it already ? Implemented in BuildingLayer. |
|
||||||||||||
|
This methods returns a pointer to a container which contains the queried informations. The user must call "delete pointer" to destroy that pointer once he/she've done with it. Implemented in BuildingLayer. |
|
||||||||||||||||
|
Resize the surface used by the structure to the new surface thanks to its new GraphicCode.
Implemented in BuildingLayer. |
|
|
Set the status of all structures
Implemented in BuildingLayer. |
|
|
Unset the status of all structures
Implemented in BuildingLayer. |
|
|
Water query button. Used by the "Query" function these controls are shared by all the derived layers Definition at line 27 of file layer.cpp. Referenced by BuildingLayer::QueryStructure(). |
1.4.2