![]() |
Trax3 3.1.0
trax track library
|
A module is a chunck of railroad stuff that is all located in one rectangular volume. More...
#include <C:/Trend/Development/Trax3/Code/trax/rigid/modules/Module.h>

Public Member Functions | |
| virtual const char * | TypeName () const noexcept=0 |
| virtual bool | IsValid () const noexcept=0 |
| Checks whether the elements in this module are valid. | |
| virtual void | SetFrame (const spat::Frame< Length, One > &frame) noexcept=0 |
| Set frame of reference. | |
| virtual const spat::Frame< Length, One > & | GetFrame () const noexcept=0 |
| Get frame of reference. | |
| virtual void | SetVolume (const spat::Box< Length > &volume) noexcept=0 |
| Gets the volume this module occupies. | |
| virtual const spat::Box< Length > & | GetVolume () const noexcept=0 |
| Sets the volume this module occupies. | |
| virtual void | Attach (std::shared_ptr< TrackSystem > pTrackSystem) noexcept=0 |
| Attaches a TrackSystem to this Module. | |
| virtual std::shared_ptr< TrackSystem > | GetTrackSystem () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< Fleet > pFleet) noexcept=0 |
| Attaches a Fleet to this Module. | |
| virtual std::shared_ptr< Fleet > | GetFleet () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< SignalCollection > pSignalCollection) noexcept=0 |
| Attaches a SignalCollection to this Module. | |
| virtual std::shared_ptr< SignalCollection > | GetSignalCollection () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< IndicatorCollection > pIndicatorCollection) noexcept=0 |
| Attaches an IndicatorCollection to the track system. | |
| virtual std::shared_ptr< IndicatorCollection > | GetIndicatorCollection () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< CargoCollection > pCargoCollection) noexcept=0 |
| Attaches an CargoCollection to the track system. | |
| virtual std::shared_ptr< CargoCollection > | GetCargoCollection () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< TimerCollection > pTimerCollection) noexcept=0 |
| Attaches a TimerCollection to the module. | |
| virtual std::shared_ptr< TimerCollection > | GetTimerCollection () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< PulseCounterCollection > pPulseCounterCollection) noexcept=0 |
| Attaches a PulseCounterCollection to the module. | |
| virtual std::shared_ptr< PulseCounterCollection > | GetPulseCounterCollection () const noexcept=0 |
| virtual void | Attach (std::shared_ptr< CameraCollection > pCameraCollection) noexcept=0 |
| Attaches an CameraCollection to the track system. | |
| virtual std::shared_ptr< CameraCollection > | GetCameraCollection () const noexcept=0 |
| virtual void | Take (Module &fromModule)=0 |
| Moves all objects from all the collections to this module. | |
| virtual void | Clear ()=0 |
| Clear the Module from all attached objects. | |
| virtual void | ClearCollections ()=0 |
| Clears all the attached collections. | |
| Public Member Functions inherited from trax::Identified< Module > | |
| virtual const std::string & | Reference (const std::string &name) const=0 |
| Gets a reference that was set for this object by name. | |
| virtual const std::vector< char const * > & | ReferenceNames (const std::string &namePart) const=0 |
| Searches for all reference names that countain namePart as substring in the name. | |
| virtual IDType | ID () const noexcept=0 |
| Identified (const Identified &)=delete | |
| Identified & | operator= (const Identified &)=delete |
| Public Member Functions inherited from trax::SocketRegistry | |
| virtual void | RegisterPlug (Plug &plug)=0 |
| Registers a Plug with the module. | |
| virtual void | UnRegisterPlug (const Plug &plug)=0 |
| Removes the supplied Plug from registration database. | |
| virtual Plug * | GetPlug (IDType id) const =0 |
| virtual IDType | MaxValidPlugID () const noexcept=0 |
| virtual void | ConnectJack (Jack &jack)=0 |
| Registers a Jack for connecting with a plug. | |
| virtual void | RemoveJack (Jack &jack) noexcept=0 |
| Remove Jacks foremerely registered with ConnectJack(). | |
| SocketRegistry (const SocketRegistry &)=delete | |
| SocketRegistry (SocketRegistry &&)=delete | |
| SocketRegistry & | operator= (const SocketRegistry &)=delete |
| SocketRegistry & | operator= (SocketRegistry &&)=delete |
Static Public Member Functions | |
| static dclspc std::unique_ptr< Module > | Make (bool bCreateCollections=true) noexcept |
| Makes a standard Module object. | |
| Static Public Member Functions inherited from trax::SocketRegistry | |
| static dclspc std::unique_ptr< SocketRegistry > | Make () noexcept |
| Makes a standard SocketRegistry object. | |
A module is a chunck of railroad stuff that is all located in one rectangular volume.
A module holds collection types of various kind to store the items. So TrackSystem, Fleet and Batch collections can be assigned to it (one of each only). A module maintains a frame of reference which is used to determine the general situation of the module. A track will give module local coordinates.
|
pure virtualnoexcept |
Attaches an CameraCollection to the track system.
| pCameraCollection | Pointer to object to attach or nullptr to remove. |
|
pure virtualnoexcept |
Attaches an CargoCollection to the track system.
| pCargoCollection | Pointer to object to attach or nullptr to remove. |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Attaches an IndicatorCollection to the track system.
| pIndicatorCollection | Pointer to object to attach or nullptr to remove. |
|
pure virtualnoexcept |
Attaches a PulseCounterCollection to the module.
| pPulseCounterCollection | Pointer to object to attach or nullptr to remove. |
|
pure virtualnoexcept |
Attaches a SignalCollection to this Module.
| pSignalCollection | Pointer to object to attach or nullptr to remove. |
|
pure virtualnoexcept |
Attaches a TimerCollection to the module.
| pTimerCollection | Pointer to object to attach or nullptr to remove. |
|
pure virtualnoexcept |
Attaches a TrackSystem to this Module.
| pTrackSystem | Pointer to object to attach or nullptr to remove. |
|
pure virtual |
Clear the Module from all attached objects.
Implements trax::SocketRegistry.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get frame of reference.
The module's frame of reference gets applied to track locations and thereby rolling stock positions etc, so these will always give ModuleSet relative values.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Checks whether the elements in this module are valid.
|
pure virtualnoexcept |
Set frame of reference.
The module's frame of reference gets applied to track locations and thereby rolling stock positions etc, so these will always give ModuleSet relative values.
|
pure virtual |
Moves all objects from all the collections to this module.
Objects only can get moved if the appropriate collections are attached to this module. The function will use the Remove() and Add() functions of decorators if applicable.
|
pure virtualnoexcept |