31#include "trax/Configuration.h"
32#include "trax/collections/Collection.h"
34#include "trax/Simulated.h"
46 struct Fleet : Collection<Fleet,Train>,
50 static dclspc std::unique_ptr<Fleet>
Make() noexcept;
137 typedef Fleet ComponentType;
142 FleetDecorator( std::shared_ptr<Fleet> pFleet )
143 : CollectionDecorator<Decorator<Fleet>>{ pFleet }
149 const Module* GetModule() const override{
150 return m_pComponent->GetModule();
153 void Update() override{
154 return m_pComponent->Update();
157 void Couple( const Bogie::Coupling& coupling ) const override{
158 return m_pComponent->Couple( coupling );
161 Train* GetTrain( const RailRunner* pRailRunner ) const override{
162 return m_pComponent->GetTrain( pRailRunner );
165 std::shared_ptr<RailRunner> GetAny( const std::string& name ) const override{
166 return m_pComponent->GetAny( name );
169 void EnableDerailing( bool bEnable ) override{
170 return m_pComponent->EnableDerailing( bEnable );
173 bool IsDerailingEnabled() const override{
174 return m_pComponent->IsDerailingEnabled();
177 void EnableCouplingForceLimits( bool bEnable ) override{
178 return m_pComponent->EnableCouplingForceLimits( bEnable );
181 bool IsCouplingForceLimitsEnabled() const override{
182 return m_pComponent->IsCouplingForceLimitsEnabled();
185 std::shared_ptr<DepotCollection> Attach( std::shared_ptr<DepotCollection> pDepotCollection ) override{
186 return m_pComponent->Attach( pDepotCollection );
189 DepotCollection* GetDepotCollection() const noexcept override{
190 return m_pComponent->GetDepotCollection();
193 void Hit( const Bogie* pBogie, const spat::VectorBundle<Real>& hitData, int filterCombination, const Materials& materialCombination ) override{
194 return m_pComponent->Hit(pBogie,hitData,filterCombination,materialCombination);
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
A Fleet holds Trains and (topmost) Bogies via their common interface RailRunner.
Definition Fleet.h:48
virtual bool IsTrainGenerationEnabled() const noexcept=0
static dclspc std::unique_ptr< Fleet > Make() noexcept
Makes a standard TrackCollection object.
virtual void EnableTrainGeneration(bool bEnable=true) noexcept=0
Enables or disables generation of trains due to decoupling.
A simulated object. Register the object with a scene to get called back for Update,...
Definition Simulated.h:39
A Train is a collection of TrainComponents that are coupled in a row.
Definition Train.h:43