Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::ptreesupport::PTreeReader Class Referenceabstract

Base class for XML readers based on ptree. More...

#include <C:/Trend/Development/Trax3/Code/trax/collections/support/CollectionSupportXML.h>

Inheritance diagram for trax::ptreesupport::PTreeReader:

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::TrackSystemReadTrackSystem (const boost::property_tree::ptree &pt) const =0

Protected Member Functions

std::unique_ptr< CurveCreateCurve (const boost::property_tree::ptree &pt) const
std::unique_ptr< RoadwayTwistCreateTwist (const boost::property_tree::ptree &pt) const

Protected Attributes

SocketRegistrym_SocketRegistry

Detailed Description

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.


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