|
| | TrackSystemDecorator (std::shared_ptr< TrackSystem > pTrackSystem) |
| | Constructs the decorator.
|
TrackSystem member function forwarding.
|
| std::shared_ptr< TrackSystem > | This () const noexcept override |
| | Gets a shared pointer to this.
|
| IDType | CreateCollection (IDType id=0) override |
| | Creates a TrackCollection with the supplied id.
|
| void | RemoveCollection (IDType id) override |
| | Removes the TrackCollection with the specified id.
|
| void | SetCollectionFrame (IDType id, const spat::Frame< Length, One > &frame) override |
| | Sets the frame of reference for a TrackCollection.
|
| const spat::Frame< Length, One > & | GetCollectionFrame (IDType id) const override |
| | Gets the frame of reference for a TrackCollection.
|
| IDType | SetActiveCollection (IDType id) override |
| | Sets a TrackCollection to be the active one.
|
| IDType | GetActiveCollection () const override |
| std::shared_ptr< TrackCollectionContainer > | GetCollectionContainer () const override |
| std::shared_ptr< TrackCollectionContainer > | SetTrackCollectionContainer (std::shared_ptr< TrackCollectionContainer > pTrackCollectionContainer) override |
| std::shared_ptr< ConnectorCollection > | SetConnectorCollection (std::shared_ptr< ConnectorCollection > pConnectorCollection) override |
| | Attaches a ConnectorCollection to the track system.
|
| ConnectorCollection * | GetConnectorCollection () const override |
| void | Couple (std::pair< std::shared_ptr< TrackBuilder >, Track::EndType > trackEnd1, std::pair< std::shared_ptr< TrackBuilder >, Track::EndType > trackEnd2) const override |
| void | Couple (const Track::Coupling &coupling, bool bUncoupledOnly=false) const override |
| std::shared_ptr< Sensor > | GetSensor (IDType id, TrackLocation *pTrackLocation) const override |
| Length | CalculateGapSize (const Track::End &theOne, const Track::End &theOther) const override |
| std::vector< Track::End > | GetUncoupledIn (const spat::Sphere< Length > &area) const override |
| | Searches for a free, uncoupled track end in the area.
|
| void | Connection (Track::Coupling &coupling) const override |
| | Completes the coupling.
|
| void | Connection (const Track::End &end, Track::End &coupled) const override |
| void | Connection (const Track::Coupling &couplings, Track::Coupling &active) const override |
| | Writes the coupled tracks data of the trackends in couplings to active.
|
| void | DeCoupleAll () override |
| | Uncouples all the Tracks in the TrackSystem from each other.
|
| | CollectionDecorator (std::shared_ptr< InterfaceType > pComponent) |
| | Decorator constructor.
|
| const char * | TypeName () const noexcept override |
|
IDType | Add (std::shared_ptr< value_type > pItem) override |
|
IDType | AddRelaxed (std::shared_ptr< value_type > pItem) override |
|
bool | Remove (value_type *pItem, bool zeroIDs=false) override |
|
int | Take (collection_type &ct) override |
| void | Clear () override |
| int | Count () const override |
| collection_type::iterator | begin () override |
| collection_type::const_iterator | cbegin () const override |
| collection_type::iterator | end () override |
| collection_type::const_iterator | cend () const override |
| std::shared_ptr< value_type > | GetFirst () const override |
|
std::shared_ptr< value_type > | GetNext (const std::shared_ptr< value_type > &pItem) const override |
| std::shared_ptr< value_type > | GetLast () const override |
|
std::shared_ptr< value_type > | GetPrevious (const std::shared_ptr< value_type > &pItem) const override |
| std::shared_ptr< value_type > | Get (IDType id) const override |
| void | PushActive (IDType id) override |
| void | PopActive () override |
| std::shared_ptr< value_type > | GetActive () const override |
|
bool | IsMember (const value_type &item) const override |
| void | ShiftIDs (int offset) override |
| IDType | MaxID () const override |
| IDType | MinID () const override |
| | SimulatedDecorator (std::shared_ptr< InterfaceType > pComponent) |
| | Decorator constructor.
|
| bool | Start (Scene &scene) override |
| void | Idle () override |
| void | Update (Time dt) override |
| void | Pause () noexcept override |
| void | Resume () noexcept override |
| void | Stop () noexcept override |
| | ObjectIDDecorator (std::shared_ptr< InterfaceType > pComponent) |
| | Decorator constructor.
|
| const std::string & | Reference (const std::string &name) const override |
| const std::vector< char const * > & | ReferenceNames (const std::string &namePart) const override |
| IDType | ID () const noexcept override |
| | ObjectIDDecorator member function forwarding.
|
|
Decorator & | operator= (const Decorator &)=delete |
|
InterfaceType * | Component () const noexcept |
| | Decorator member function forwarding.
|
| virtual void | CoupleAll (Length maxDistance=1_m, Angle maxKink=pi, bool bSilent=true)=0 |
| | Couples all open ends in the track system, if they are closer than maxDistance.
|
| virtual bool | IsValid () const noexcept=0 |
| | Checks whether the elements in this collection are valid.
|
| virtual IDType | Add (std::shared_ptr< TrackBuilder > pValue_Type)=0 |
| | Adds an element to the container and returns its index in the container.
|
| virtual IDType | AddRelaxed (std::shared_ptr< TrackBuilder > pTraxType)=0 |
| | Adds an element to the container and returns its index in the container. Does not throw.
|
| virtual bool | Remove (TrackBuilder *pValue_Type, bool zeroIDs=false)=0 |
| | Removes an element from this container.
|
| virtual int | Take (TrackSystem &collection_Type)=0 |
| | Moves all the items from another container to this container.
|
| virtual std::shared_ptr< TrackBuilder > | GetNext (const std::shared_ptr< TrackBuilder > &pValue_Type) const=0 |
| virtual std::shared_ptr< TrackBuilder > | GetPrevious (const std::shared_ptr< TrackBuilder > &pValue_Type) const=0 |
|
| Collection (const Collection &)=delete |
|
Collection & | operator= (const Collection &)=delete |
|
virtual bool | IsMember (const value_type &item) const=0 |
|
| Identified (const Identified &)=delete |
|
Identified & | operator= (const Identified &)=delete |
A decorator for TrackSystems.
With trax decorators can get used to augment trax objects with additional behaviour and services. Derive your own class from the decorator and overwrite its methods. Create your decorator with the trax object and supply it to the library instead of the original object. In case of a track system one might build e.g. graphics data for a track that gets added to a TrackSystem and destroy it if the track gets removed.