![]() |
Trax3 3.1.0
trax track library
|
Base class for XML readers based on ptree. More...
#include <C:/Trend/Development/Trax3/Code/trax/collections/support/CollectionSupportXML.h>

Public Types | |
| using | CurveReaderFunction = std::unique_ptr<Curve> (*)( const boost::property_tree::ptree& pt ) |
| using | TwistReaderFunction = std::unique_ptr<RoadwayTwist> (*)( const boost::property_tree::ptree& pt ) |
Public Member Functions | |
| dclspc | PTreeReader (const char *pLocale=nullptr) |
| dclspc | PTreeReader (SocketRegistry &socketRegistry, const char *pLocale=nullptr) |
| PTreeReader (const PTreeReader &)=delete | |
| dclspc | PTreeReader (PTreeReader &&) noexcept |
| PTreeReader & | operator= (const PTreeReader &)=delete |
| PTreeReader & | operator= (PTreeReader &&) noexcept=delete |
| void dclspc | RegisterCurveReader (const std::string &typeName, CurveReaderFunction readerFunc) |
| void dclspc | UnregisterCurveReader (const std::string &typeName) |
| void dclspc | RegisterTwistReader (const std::string &typeName, TwistReaderFunction readerFunc) |
| void dclspc | UnregisterTwistReader (const std::string &typeName) |
| const char * | GetLocale () const |
| virtual std::shared_ptr< trax::TrackSystem > | ReadTrackSystem (const boost::property_tree::ptree &pt) const =0 |
Protected Member Functions | |
| std::unique_ptr< Curve > | CreateCurve (const boost::property_tree::ptree &pt) const |
| std::unique_ptr< RoadwayTwist > | CreateTwist (const boost::property_tree::ptree &pt) const |
Protected Attributes | |
| SocketRegistry & | m_SocketRegistry |
Base class for XML readers based on ptree.
If curves or twists are not needed, they don't have to be registered with the reader; this prevents unnecessary coupling of all the elements the library provides and offers a method to extend the system with custom curves and twists.
Albeit this might seem to be better implemented in traxTrack, the reading can not be done for a single track. Plugs/Jacks and the track coupling as well as shared curves relate to whole systems of tracks. Hence we have it in traxTrackCollections.