Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
TrackSystemParser.h
1// trax track library
2// AD 2024
3//
4// "the resolution of all the fruitless searches"
5//
6// Peter Gabriel
7//
8// Copyright (c) 2025 Trend Redaktions- und Verlagsgesellschaft mbH
9// Copyright (c) 2019 Marc-Michael Horstmann
10//
11// Permission is hereby granted to any person obtaining a copy of this software
12// and associated source code (the "Software"), to use, view, and study the
13// Software for personal or internal business purposes, subject to the following
14// conditions:
15//
16// 1. Redistribution, modification, sublicensing, or commercial use of the
17// Software is NOT permitted without prior written consent from the copyright
18// holder.
19//
20// 2. The Software is provided "AS IS", without warranty of any kind, express
21// or implied.
22//
23// 3. All copies of the Software must retain this license notice.
24//
25// For further information, please contact: horstmann.marc@trendverlag.de
26
27#pragma once
28
29#include "trax/Parser.h"
30
31#include "trax/Curve.h"
32#include "trax/IDType.h"
33#include "trax/Section.h"
34#include "trax/Track.h"
35
36namespace trax{
37
38 struct TrackLocationRef;
39 struct TrackSystem;
40
41 struct TrackSystemParser : virtual Parser{
42
43 virtual bool TrackSystemStart() noexcept(false) { return true; }
44
45 virtual bool TrackCollectionStart(
46 IDType /*id*/ ) noexcept(false) { return true; }
47
48 virtual bool TrackStart(
49 IDType /*id*/,
50 const std::string& /*reference*/ ) noexcept(false) { return true; }
51
52 virtual bool TrackConnection(
53 const Track::Coupling& /*coupling*/ ) noexcept(false) { return true; }
54
55 virtual bool BufferStop(
56 Track::End /*theOne*/ ) noexcept(false) { return true; }
57
58 virtual bool OpenEnd(
59 Track::End /*theOne*/ ) noexcept(false) { return true; }
60
61
62 virtual bool CurveStart() noexcept(false) { return true; }
63
64 virtual bool Line(
65 const LineP::Data& /*data*/ ) noexcept(false) { return true; }
66
67 virtual bool Arc(
68 const ArcP::Data& /*data*/ ) noexcept(false) { return true; }
69
70 virtual bool Helix(
71 const HelixP::Data& /*data*/ ) noexcept(false) { return true; }
72
73 virtual bool Clothoid(
74 const Clothoid::Data& /*data */) noexcept(false) { return true; }
75
76 virtual bool Cubic(
77 const Cubic::Data& /*data*/ ) noexcept(false) { return true; }
78
79 virtual bool Spline(
80 const Spline::Data& /*data*/ ) noexcept(false) { return true; }
81
82 virtual bool Rotator(
83 const Rotator::Data& /*data*/ ) noexcept(false) { return true; }
84
85 virtual bool RotatorChain(
86 const RotatorChain::Data& /*data*/ ) noexcept(false) { return true; }
87
88 virtual bool PolygonalChain(
89 const PolygonalChain::Data& /*data*/ ) noexcept(false) { return true; }
90
91 virtual bool SampledCurve(
92 const SampledCurve::Data& /*data*/ ) noexcept(false) { return true; }
93
94 virtual bool EEPCurve(
95 const EEPCurve::Data& /*data*/ ) noexcept(false) { return true; }
96
97 virtual void CurveEnd() noexcept(false) {}
98
99
100 virtual bool TwistStart() noexcept(false) { return true; }
101
102 virtual bool ConstantTwist(
103 Angle /*twist*/ ) noexcept(false) { return true; }
104
105 virtual bool LinearTwist(
106 Angle /*startAngle*/,
107 Angle /*endAngle*/ ) noexcept(false) { return true; }
108
109 virtual bool PiecewiseTwist(
110 PiecewiseTwist::Data /*data*/ ) noexcept(false) { return true; }
111
112 virtual bool PiecewiseLinearTwist(
113 PiecewiseTwist::Data /*data*/ ) noexcept(false) { return true; }
114
115 virtual bool DirectionalTwist(
116 spat::Vector<One> /*attractor*/ ) noexcept(false) { return true; }
117
118 virtual bool CombinedTwistStart() noexcept(false) { return true; }
119
120 virtual void CombinedTwistEnd() noexcept(false) {}
121
122
123 virtual void TwistEnd() noexcept(false) {}
124
125
126 virtual bool Section(
127 Section::SpecialSections /*type*/ ) noexcept(false) { return true; }
128
129 virtual void TrackEnd() noexcept(false) {}
130
131 virtual void TrackCollectionEnd() noexcept(false) {}
132
133 virtual bool ConnectorCollectionStart() noexcept(false) { return true; }
134
135 virtual void ConnectorCollectionEnd() noexcept(false) {}
136
137 virtual void TrackSystemEnd(
138 IDType /*activeTrack*/ ) noexcept(false) {}
139
140 };
141
142 bool dclspc ParseTrackSystem( std::basic_istream<char>& stream, TrackSystemParser& callback ) noexcept(false);
143
144 bool dclspc ParseTrackSystem( std::string filePath, TrackSystemParser& callback ) noexcept(false);
145
146 bool dclspc ParseTrackSystem( const TrackSystem& trackSystem, TrackSystemParser& callback ) noexcept(false);
147
148
149
150
151} // namespace trax
Home of the Track and TrackBuilder interfaces.
Value< Dimension< 0, 0, 0 > > Angle
Angle in radians.
Definition DimensionedValues.h:320
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
Implements a 3D - vector in cartesian coordinates.
Definition Vector.h:48
Data definig the curve.
Definition Curve.h:681
Data defining the curve.
Definition Curve.h:1405
CubicData Data
Data definig the curve.
Definition Curve.h:1073
Data definig the curve.
Definition Curve.h:1944
Data definig the curve.
Definition Curve.h:915
Type used for IDs in the trax library.
Definition IDType.h:43
Data definig the curve.
Definition Curve.h:523
Data definig the curve.
Definition Curve.h:1580
std::vector< SegmentValueType > Data
Data defining the curve.
Definition Curve.h:1641
SpecialSections
Predefined cross sections.
Definition Section.h:52
std::vector< SegmentValueType > Data
Data definig the curve.
Definition Curve.h:1183
Designates two track ends. Typically used for coupling relations.
Definition Track.h:325
Designates an end at a specific track.
Definition Track.h:303
A track location, referencing the track by id.
Definition TrackLocation.h:102
A track system is the container for tracks.
Definition TrackSystem.h:56
Definition TrackSystemParser.h:41