#include <TraplasObject.h>
Inheritance diagram for Infrastructure:


Public Member Functions | |
| Infrastructure (int infrastructure_id, int type_infrastructure, double spd, int tile_type, unsigned int cap, double dist, osg::Node *infra_model) | |
| bool | addCarg (int a_carg) | 
| int | removeCarg (int r_carg) | 
| int | getTileType () | 
| double | getSpeed () | 
| bool | setSpeed (double s_spd) | 
| unsigned int | getCapacity () | 
| double | getDistance () | 
| bool | addArc (int to) | 
| bool | isArc (int end) | 
| virtual string | toString () | 
Protected Attributes | |
| int | tileType | 
| unsigned int | capacity | 
| double | distance | 
| double | speed | 
| int | width | 
| int | height | 
| set< int > | cargoSet | 
| map< int, int * > | arcs | 
Infrastructure contains all information about one infrastructure resource such as speed, objects at the location of the infrastructure resource, tile type.
Definition at line 232 of file TraplasObject.h.
      
  | 
  ||||||||||||||||||||||||||||||||
| 
 Constructor. 
 
 Definition at line 229 of file TraplasObject.cpp. References capacity, distance, TraplasObject::id, TraplasObject::model, TraplasObject::selected, TraplasObject::setDescription(), speed, and TraplasObject::type. Here is the call graph for this function: ![]()  | 
  
      
  | 
  
| 
 Sets the arc from this Infrastructure resource to the next. 
 
 Definition at line 260 of file TraplasObject.cpp. References arcs. Referenced by StateControl::arc().  | 
  
      
  | 
  
| 
 Adds cargo to this infrastructure resouce. 
 
 Definition at line 255 of file TraplasObject.cpp. References cargoSet. Referenced by StateControl::newcarg(), and StateControl::unload().  | 
  
      
  | 
  
| 
 
 
 Definition at line 275 of file TraplasObject.h. References capacity.  | 
  
      
  | 
  
| 
 
 
 Definition at line 279 of file TraplasObject.h. References distance.  | 
  
      
  | 
  
| 
 
 
 Definition at line 265 of file TraplasObject.h. References speed.  | 
  
      
  | 
  
| 
 
 
 Definition at line 261 of file TraplasObject.h. References tileType.  | 
  
      
  | 
  
| 
 
 
 
 Definition at line 268 of file TraplasObject.cpp. References arcs.  | 
  
      
  | 
  
| 
 Removes cargo from this infrastructure resource. 
 
 Definition at line 247 of file TraplasObject.cpp. References cargoSet. Referenced by StateControl::load().  | 
  
      
  | 
  
| 
 Sets the maximum speed in this infrastructure resource. 
 
 Definition at line 242 of file TraplasObject.cpp. References speed.  | 
  
      
  | 
  
| 
 
 
 Reimplemented from TraplasObject. Definition at line 273 of file TraplasObject.cpp. References capacity, TraplasObject::description, and speed.  | 
  
      
  | 
  
| 
 
 Definition at line 303 of file TraplasObject.h.  | 
  
      
  | 
  
| 
 
 Definition at line 297 of file TraplasObject.h. Referenced by getCapacity(), Infrastructure(), and toString().  | 
  
      
  | 
  
| 
 
 Definition at line 302 of file TraplasObject.h. Referenced by addCarg(), and removeCarg().  | 
  
      
  | 
  
| 
 
 Definition at line 298 of file TraplasObject.h. Referenced by getDistance(), and Infrastructure().  | 
  
      
  | 
  
| 
 
 Definition at line 301 of file TraplasObject.h.  | 
  
      
  | 
  
| 
 
 Definition at line 299 of file TraplasObject.h. Referenced by getSpeed(), Infrastructure(), setSpeed(), and toString().  | 
  
      
  | 
  
| 
 
 Definition at line 296 of file TraplasObject.h. Referenced by getTileType().  | 
  
      
  | 
  
| 
 
 Definition at line 300 of file TraplasObject.h.  | 
  
 1.4.4