# Data Structures

Here are the data structures with brief descriptions:

AdaptT< T > | Adapter wrapper for CCountedPtr like classes that can't be used directly by stl collections as item type
Aircraft | This class 'wraps' Vehicle; you do not actually instantiate this class
AnimCursor | A single sprite of a list of animated cursors
ArrayT< T[N]> | Helper template class that provides C array length and item type
BaseStorageArray | Base class for all NewGRF storage arrays
Blitter | How all blitters should look like
BlitterFactory< T > | A template factory, so ->GetName() works correctly
BlitterFactoryBase | The base factory, keeping track of all blitters
BridgeSpec | Struct containing information about a single bridge type
CargoList | Simple collection class for a list of cargo packets
CargoPacket | We want to use a pool
CArrayT< Titem_, Tblock_size_, Tnum_blocks_ > | Flexible array with size limit
CBinaryHeapT< Titem_ > | Binary Heap as C++ template
CBlobBaseSimple | Base class for simple binary blobs
CBlobBaseSimple::CHdr | Header of the allocated memory block
CBlobT< Titem_, Tbase_ > | Blob - simple dynamic Titem_ array
CCountedPtr< Tcls_ > | CCountedPtr - simple reference counting smart pointer
CFixedSizeArrayT< Titem_, Tcapacity_ > | Fixed size array Upon construction it preallocates fixed size block of memory for all items, but doesn't construct them
CFixedSizeArrayT< Titem_, Tcapacity_ >::CHdr | Header for fixed size array
CFollowTrackT< Ttr_type_, T90deg_turns_allowed_ > | Track follower helper template class (can serve pathfinders and vehicle controllers)
CHashTableT< Titem_, Thash_bits_ > | Class CHashTableT<Titem, Thash_bits> - simple hash table of pointers allocated elsewhere
CNodeList_HashTableT< Titem_, Thash_bits_open_, Thash_bits_closed_ > | Hash table based node list multi-container class
Command | Define a command with the flags which belongs to it
CommandCost | Common return value for all commands
CSegmentCostCacheBase | Base class for segment cost cache providers
CSegmentCostCacheT< Tsegment > | CSegmentCostCacheT - template class providing hash-map and storage (heap) of Tsegment structures
CStrApiBaseT< Tchar > | String API mapper base - just mapping by character type, not by case sensitivity yet
CStrT< Tchar, TcaseInsensitive > | Blob based string
CYapfBaseT< Types > | CYapfBaseT - A-star type path finder base class
CYapfCostShipT< Types > | Cost Provider module of YAPF for ships
CYapfDestinationTileT< Types > | YAPF destination provider base class - used when destination is single tile / multiple trackdirs
CYapfFollowShipT< Types > | Node Follower module of YAPF for ships
CYapfNodeKeyExitDir | Yapf Node Key that evaluates hash from (and compares) tile & exit dir
CYapfNodeT< Tkey_, Tnode > | Yapf Node base
CYapfOriginTileT< Types > | YAPF origin provider base class - used when origin is one tile / multiple trackdirs
CYapfOriginTileTwoWayT< Types > | YAPF origin provider base class - used when there are two tile/trackdir origins
CYapfRailNodeT< Tkey_ > | Yapf Node for rail YAPF
CYapfRailSegment | Cached segment cost for rail YAPF
CYapfRailSegmentKey | Key for cached segment cost for rail YAPF
CYapfRoadNodeT< Tkey_ > | Yapf Node for road YAPF
CYapfSegmentCostCacheGlobalT< Types > | CYapfSegmentCostCacheGlobalT - the yapf cost cache provider that adds the segment cost caching functionality to yapf
CYapfSegmentCostCacheLocalT< Types > | CYapfSegmentCostCacheLocalT - the yapf cost cache provider that implements fake segment cost caching functionality for yapf
CYapfSegmentCostCacheNoneT< Types > | CYapfSegmentCostCacheNoneT - the formal only yapf cost cache provider that implements PfNodeCacheFetch() and PfNodeCacheFlush() callbacks
CYapfShip_TypesT< Tpf_, Ttrack_follower, Tnode_list > | Config struct of YAPF for ships
CYapfShipNodeT< Tkey_ > | Yapf Node for ships
CYapfT< Ttypes > | YAPF template that uses Ttypes template argument to determine all YAPF components (base classes) from which the actual YAPF is composed
difficulty_d | Carriage for the game settings window data
DisasterVehicle | This class 'wraps' Vehicle; you do not actually instantiate this class
DrawBuildingsTileStruct | This structure is the same for both Industries and Houses
DrawIndustryAnimationStruct | This is used to gather some data about animation drawing in the industry code Image_1-2-3 are in fact only offset in the sprites used by the industry
DrawIndustryCoordinates | Simple structure gathering x,y coordinates for industries animations
DropDownListItem | Base list item class from which others are derived
DropDownListParamStringItem | String list item with parameters
DropDownListStringItem | Common string list item
DumpTarget | Class that represents the dump-into-string target
DumpTarget::KnownStructKey | Used as a key into map of known object instances
DynamicLanguages | Used for dynamic language support
EngineInfo | Information about a vehicle
EngineRenew | Memory pool for engine renew elements
EntityIDMapping | Maps an entity id stored on the map to a GRF file
EnumPropsT< DiagDirection > | Define basic enum properties
EnumPropsT< Direction > | Define basic enum properties
EnumPropsT< OrderType > | Define basic enum properties
EnumPropsT< Owner > | Define basic enum properties
EnumPropsT< RailType > | Define basic enum properties
EnumPropsT< SoundFx > | Define basic enum properties
EnumPropsT< StationClassID > | Define basic enum properties
EnumPropsT< TownLayout > | Define basic enum properties
EnumPropsT< Track > | Define basic enum properties
EnumPropsT< TrackBits > | Define basic enum properties
EnumPropsT< Trackdir > | Define basic enum properties
EnumPropsT< TrackdirBits > | Define basic enum properties
fnd_d | Attached struct to the window extended data
GRFFileProps | Data related to the handling of grf files
GRFMappedStringID | A string with the required information to perform a GRF string remapping
GRFText | Element of the linked list
GRFTextEntry | Holder of the above structure
HeightMap | Height map - allocated array of heights (MapSizeX() + 1) x (MapSizeY() + 1)
HouseClassMapping | Makes class IDs unique to each GRF file
IConsoleAlias | --Aliases-- Aliases are like shortcuts for complex functions, variable assignments, etc
IConsoleVar | --Variables-- Variables are pointers to real ingame variables which allow for changing while ingame
Industry | Defines the internal data of a functionnal industry
IndustryData | Helper struct holding the available industries for current situation
IndustrySpec | Defines the data structure for constructing industry
IndustryTileSpec | Defines the data structure of each indivudual tile of an industry
indview_d | Information to store about the industry window
IniItem | Structs describing the ini format
InvalidVehicle | This class 'wraps' Vehicle; you do not actually instantiate this class
Language | Information about a language
LegendAndColour | Structure for holding relevant data for legends in small map
MakeEnumPropsT< Tenum_t, Tstorage_t, Tbegin, Tend, Tinvalid > | Helper template class that makes basic properties of given enumeration type visible from outsize
NetworkGameList | Structure with information shown in the game list (GUI)
OldMemoryPoolBase | Stuff for dynamic vehicles
OverflowSafeInt< T, T_MAX, T_MIN > | Overflow safe template for integers, i.e
PersistentStorageArray< TYPE, SIZE > | Class for persistent storage of data
PlayerFaceBitsInfo | Information about the valid values of PlayerFace bitgroups as well as the sprites to draw
plstations_d | Information about station list
PoolItem< T, Tid, Tpool > | Generalization for all pool items that are saved in the savegame
ProbabilityHelper | Simple helper that will collect data for the generation of industries
RailtypeInfo | This struct contains all the info that is needed to draw and construct tracks
Randomizer | Structure to encapsulate the pseudo random number generators
RoadStop | A Stop for a Road Vehicle
RoadTypeInfo | Structure holding information per roadtype for several functions
RoadVehicle | This class 'wraps' Vehicle; you do not actually instantiate this class
SaveLoad | SaveLoad type struct
SaveLoadFormat | The format for a reader/writer type of a savegame
Ship | This class 'wraps' Vehicle; you do not actually instantiate this class
SimpleCountedObject | Simple counted object
SmallSet< Tdir, items > | Set containing 'items' items of 'tile and Tdir' No tree structure is used because it would cause slowdowns in most usual cases
SmallSet< Tdir, items >::SSdata | Element of set
SmallStackSafeStackAlloc< T, length > | A small 'wrapper' for allocations that can be done on most OSes on the stack, but are just too large to fit in the stack on devices with a small stack such as the NDS
SpecialVehicle | This class 'wraps' Vehicle; you do not actually instantiate this class
StationClass | Struct containing information relating to station classes
StationRect | StationRect - used to track station spread out rectangle - cheaper than scanning whole map
StringIDCompare | Key comparison function for std::map
SubSprite | Used to only draw a part of the sprite
TarListEntry | The define of a TarList
TemporaryStorageArray< TYPE, SIZE > | Class for temporary storage of data
Tile | Data that is stored per tile
TileExtended | Data that is stored per tile
TileIndexDiffC | A pair-construct of a TileIndexDiff
TinyEnumT< Tenum_t > | The general declaration of TinyEnumT<> (above)
Train | This class 'wraps' Vehicle; you do not actually instantiate this class