CYapfOriginRouteLinkT< Types > Class Template Reference

YAPF origin provider for route links. More...

Inheritance diagram for CYapfOriginRouteLinkT< Types >:
CYapfT< CYapfRouteLink_TypesT< CYapfRouteLink > > CYapfRouteLink

Public Member Functions

FORCEINLINE CargoID GetCargoID () const
 Get the current cargo type.
FORCEINLINE byte GetFlags () const
 Get the cargo routing flags.
void SetOrigin (CargoID cid, TileIndex src, const StationList *stations, bool cargo_creation, OrderID order, byte flags)
 Set origin.
void PfSetStartupNodes ()
 Called when YAPF needs to place origin nodes into the open list.

Private Types

typedef Types::Tpf Tpf
 The pathfinder class (derived from THIS class).
typedef Types::NodeList::Titem Node
 This will be our node type.

Private Member Functions

FORCEINLINE TpfYapf ()
 To access inherited path finder.

Private Attributes

CargoID m_cid
TileIndex m_src
OrderID m_order
byte m_flags
SmallVector< RouteLink, 2 > m_origin

Detailed Description

template<class Types>
class CYapfOriginRouteLinkT< Types >

YAPF origin provider for route links.

Definition at line 199 of file yapf_cargo.cpp.


Member Function Documentation

template<class Types >
FORCEINLINE CargoID CYapfOriginRouteLinkT< Types >::GetCargoID (  )  const [inline]

Get the current cargo type.

Definition at line 214 of file yapf_cargo.cpp.

template<class Types >
FORCEINLINE byte CYapfOriginRouteLinkT< Types >::GetFlags (  )  const [inline]

Get the cargo routing flags.

Definition at line 220 of file yapf_cargo.cpp.

template<class Types >
void CYapfOriginRouteLinkT< Types >::PfSetStartupNodes (  )  [inline]

Called when YAPF needs to place origin nodes into the open list.

Definition at line 246 of file yapf_cargo.cpp.

References SmallVector< T, S >::Begin(), DistanceSquare(), SmallVector< T, S >::End(), SpecializedStation< Station, false >::Get(), and CYapfOriginRouteLinkT< Types >::Yapf().

template<class Types >
void CYapfOriginRouteLinkT< Types >::SetOrigin ( CargoID  cid,
TileIndex  src,
const StationList stations,
bool  cargo_creation,
OrderID  order,
byte  flags 
) [inline]
template<class Types >
FORCEINLINE Tpf& CYapfOriginRouteLinkT< Types >::Yapf (  )  [inline, private]

To access inherited path finder.

Definition at line 210 of file yapf_cargo.cpp.

Referenced by CYapfOriginRouteLinkT< Types >::PfSetStartupNodes().


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

Generated on Sun May 8 07:31:02 2011 for OpenTTD by  doxygen 1.6.1