Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
TerrainRoadCollection Class Reference

#include <TerrainRoads.h>

Inherits SubsystemInterface.

Public Member Functions

 TerrainRoadCollection (void)
 
 ~TerrainRoadCollection (void)
 
void init ()
 
void reset ()
 
void update ()
 
TerrainRoadTypefindRoad (AsciiString name)
 find road with matching name
 
TerrainRoadTypenewRoad (AsciiString name)
 allocate new road, assing name, and link to list
 
TerrainRoadTypefirstRoad (void)
 return first road
 
TerrainRoadTypenextRoad (TerrainRoadType *road)
 get next road
 
TerrainRoadTypefindBridge (AsciiString name)
 find bridge with matching name
 
TerrainRoadTypenewBridge (AsciiString name)
 allocate new bridge, assign name, and link
 
TerrainRoadTypefirstBridge (void)
 return first bridge
 
TerrainRoadTypenextBridge (TerrainRoadType *bridge)
 get next bridge
 
TerrainRoadTypefindRoadOrBridge (AsciiString name)
 search roads and bridges
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Attributes

TerrainRoadTypem_roadList
 list of available roads
 
TerrainRoadTypem_bridgeList
 list of available bridges
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Static Protected Attributes

static UnsignedInt m_idCounter = 0
 unique id counter when allocating roads/bridges
 

Detailed Description

Collection of all roads and bridges

Definition at line 198 of file TerrainRoads.h.

Constructor & Destructor Documentation

◆ TerrainRoadCollection()

TerrainRoadCollection::TerrainRoadCollection ( void )

< MUST start this at 1.

Definition at line 237 of file TerrainRoads.cpp.

◆ ~TerrainRoadCollection()

TerrainRoadCollection::~TerrainRoadCollection ( void )

Definition at line 249 of file TerrainRoads.cpp.

Member Function Documentation

◆ findBridge()

TerrainRoadType * TerrainRoadCollection::findBridge ( AsciiString name)

find bridge with matching name

Find bridge with matching name

Definition at line 308 of file TerrainRoads.cpp.

◆ findRoad()

TerrainRoadType * TerrainRoadCollection::findRoad ( AsciiString name)

find road with matching name

Find road with matching name

Definition at line 288 of file TerrainRoads.cpp.

◆ findRoadOrBridge()

TerrainRoadType * TerrainRoadCollection::findRoadOrBridge ( AsciiString name)

search roads and bridges

Search the roads AND bridge lists for the name

Definition at line 328 of file TerrainRoads.cpp.

◆ firstBridge()

TerrainRoadType * TerrainRoadCollection::firstBridge ( void )
inline

return first bridge

Definition at line 217 of file TerrainRoads.h.

◆ firstRoad()

TerrainRoadType * TerrainRoadCollection::firstRoad ( void )
inline

return first road

Definition at line 212 of file TerrainRoads.h.

◆ init()

void TerrainRoadCollection::init ( )
inlinevirtual
  • Assign any default values to data required for the class
    • Allocate any memory and resources needed throughout the lifetime of the class

Implements SubsystemInterface.

Definition at line 206 of file TerrainRoads.h.

◆ newBridge()

TerrainRoadType * TerrainRoadCollection::newBridge ( AsciiString name)

allocate new bridge, assign name, and link

Allocate a new bridge

Definition at line 378 of file TerrainRoads.cpp.

◆ newRoad()

TerrainRoadType * TerrainRoadCollection::newRoad ( AsciiString name)

allocate new road, assing name, and link to list

Allocate a new road, set the name, and link to the road list

Definition at line 342 of file TerrainRoads.cpp.

◆ nextBridge()

TerrainRoadType * TerrainRoadCollection::nextBridge ( TerrainRoadType * bridge)

get next bridge

Return next bridge in list

Definition at line 451 of file TerrainRoads.cpp.

◆ nextRoad()

TerrainRoadType * TerrainRoadCollection::nextRoad ( TerrainRoadType * road)

get next road

Return next road in list

Definition at line 440 of file TerrainRoads.cpp.

◆ reset()

void TerrainRoadCollection::reset ( )
inlinevirtual
  • Any system should be able to reset all data and go back to an empty state that is ready to accept a completely new set of data. Reset() can expect to be used in the context of resetting the engine in order to start or load a new game.
    • Do NOT free and re-allocate resources needed, where possible reorganize and re-initialize the resources already allocated.
    • After a reset, the system does not need to be in EXACTLY the same state as a fresh instantiation. If there are persistent state information for the system make sure you maintain it while restoring or re-initializing other transient parts.

Implements SubsystemInterface.

Definition at line 207 of file TerrainRoads.h.

◆ update()

void TerrainRoadCollection::update ( )
inlinevirtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 208 of file TerrainRoads.h.

Member Data Documentation

◆ m_bridgeList

TerrainRoadType* TerrainRoadCollection::m_bridgeList
protected

list of available bridges

Definition at line 225 of file TerrainRoads.h.

◆ m_idCounter

UnsignedInt TerrainRoadCollection::m_idCounter = 0
staticprotected

unique id counter when allocating roads/bridges

Definition at line 226 of file TerrainRoads.h.

◆ m_roadList

TerrainRoadType* TerrainRoadCollection::m_roadList
protected

list of available roads

Definition at line 224 of file TerrainRoads.h.


The documentation for this class was generated from the following files: