|
Model Railroad System 2.2.2
|
MRRXtrkCad parser class. More...
#include <ParserClassesGroup.h>
Public Types | |
| enum | YY_MRRXtrkCad_ENUM_TOKEN { YY_MRRXtrkCad_NULL_TOKEN =0 , INTEGER =258 , FLOAT =259 , STRING =260 , RESTOFLINE =261 , MULTILINE =262 , EOL =263 , UNTERMSTRING =264 , NOTWORD =265 , END =266 , _VERSION =267 , TITLE =268 , MAPSCALE =269 , ROOMSIZE =270 , SCALE =271 , HO =272 , N =273 , O =274 , LAYERS =275 , CURRENT =276 , STRUCTURE =277 , DRAW =278 , CURVE =279 , TURNOUT =280 , TURNTABLE =281 , STRAIGHT =282 , CAR =283 , JOINT =284 , NOTE =285 , TEXT =286 , MAIN =287 , B =288 , J =289 , D =290 , L =291 , M =292 , F =293 , T =294 , E =295 , G =296 , A =297 , P =298 , S =299 , C =300 , X =301 , Y =302 , Q =303 , BLOCK =304 , TRK =305 , SWITCHMOTOR =306 } |
Public Member Functions | |
| int | yyparse (void) |
| virtual void | yyerror (char *msg) |
| virtual int | yylex () |
| MRRXtrkCad (const char *filename) | |
| The constructor function. More... | |
| virtual | ~MRRXtrkCad () |
Public Member Functions inherited from Parsers::LayoutFile | |
| LayoutFile (const char *filename, MRRXtrkCad *p) | |
| Constructor. More... | |
| virtual | ~LayoutFile () |
| Destructor. More... | |
| void | Emit (ostream &outstream) |
| Function to Emit a track graph to an output stream. More... | |
| bool | IsNodeP (int nid) const |
| Tests if a node id exists in the graph. More... | |
| int | NumEdges (int nid) const |
| Returns the number of edges for the specificed node id. More... | |
| int | EdgeIndex (int nid, int edgenum) const |
| Returns the node id of the specificed edge of the node. More... | |
| float | EdgeX (int nid, int edgenum) const |
| Returns the $X$ coordinate of the specificed edge of the node. More... | |
| float | EdgeY (int nid, int edgenum) const |
| Returns the $Y$ coordinate of the specificed edge of the node. More... | |
| float | EdgeA (int nid, int edgenum) const |
| Returns the angle of the specificed edge of the node. More... | |
| float | EdgeLength (int nid, int edgenum) const |
| Returns the length of an edge. More... | |
| TrackGraph::NodeType | TypeOfNode (int nid) const |
| Returns the type of the node. More... | |
| const TurnoutGraphic * | NodeTurnoutGraphic (int nid) const |
| Returns the TurnoutGraphic of the node. More... | |
| const TurnoutRoutelist * | NodeTurnoutRoutelist (int nid) const |
| Returns the TurnoutRoutelist of the node. More... | |
| float | LengthOfNode (int nid) const |
| Return the track length of a node. More... | |
| const IntegerList * | TrackList (int nid) const |
| Return a block's tracklist. More... | |
| int | TurnoutNumber (int nid) const |
| Return a switchmotor's turnout number. More... | |
| const char * | NameOfNode (int nid) const |
| Return a block's or switchmotor's name. More... | |
| const char * | SenseScript (int nid) const |
| Return a block's or switchmotor's sense script. More... | |
| const char * | NormalActionScript (int nid) const |
| Return a switchmotor's normal action script. More... | |
| const char * | ReverseActionScript (int nid) const |
| Return a block's or switchmotor's reverse action script. More... | |
| int | NumberOfHeads (int nid) const |
| Return a Signal's number of heads. More... | |
| const StringPairList * | SignalAspects (int nid) const |
| Return a Signal's aspect list. More... | |
| float | OrigX (int nid) const |
| Return the $x$ coordinate of the signal base. More... | |
| float | OrigY (int nid) const |
| Return the $y$ coordinate of the signal base. More... | |
| float | Angle (int nid) const |
| Return the angle of the signal. More... | |
| const char * | OnScript (int nid) const |
| Return the on action script. More... | |
| const char * | OffScript (int nid) const |
| Return the off action script. More... | |
| int | LowestNode () const |
| Returns the lowest numbered node id. More... | |
| int | HighestNode () const |
| Returns the highest numbered node id. More... | |
| void | CompressGraph () |
| Create a compressed graph. More... | |
| int | CompressedEdgeCount (int cnid) const |
| Number of compressed graph edges. More... | |
| float | CompressedEdgeLength (int cnid, int edgenum) const |
| Length of a compressed graph edge. More... | |
| int | CompressedEdgeNode (int cnid, int edgenum) const |
| Next Edge node. More... | |
| IntegerList * | CompressedNodeSegments (int cnid) const |
| Raw nodes in a compressed graph node. More... | |
| bool | IsCompressed () const |
| const IntegerList * | Heads () |
| bool | IsCompressedNode (int cnid) const |
| Is cid a node in the compressed graph? More... | |
| const IntegerList * | Roots () |
| Compressed graph roots. More... | |
| double | CompressedNodePositionX (int cnid) const |
| X Coordinate of a Compressed Node position. More... | |
| double | CompressedNodePositionY (int cnid) const |
| X Coordinate of a Compressed Node position. More... | |
| void | CompressedGraphCircleLayout (double radius) |
| Run the BGL circle_graph_layout for a given radius. More... | |
| bool | CompressedGraphKamadaKawaiSpring (double sidelength) |
| Run the BGL kamada_kawai_spring_layout for a given side length. More... | |
| TrackGraph::CompressedEdgePairVector | CompressedGraphKruskalMinimumSpanningTree () |
| Run the kruskal_minimum_spanning_tree algorithm and return a vector of edge pairs. More... | |
| TrackGraph::CompressedEdgePairVector | CompressedGraphPrimMinimumSpanningTree () |
| Run the prim_minimum_spanning_tree algorithm and return a vector of edge pairs. More... | |
Public Member Functions inherited from Parsers::ParseFile | |
| const char * | SourceFile () const |
| Return the name of the source file. More... | |
| ParseFile (const char *filename) | |
| Constructor. More... | |
| virtual | ~ParseFile () |
| Destructor. More... | |
| int | ProcessFile (ostream &err) |
| open file and parse it. More... | |
Public Attributes | |
| yy_MRRXtrkCad_stype | yylval |
| yyltype | yylloc |
| int | yynerrs |
| int | yychar |
| int | yydebug |
Private Member Functions | |
| int | lookup_word (const char *word) const |
| void | yyerror1 (const char *message, const char *s) const |
Private Attributes | |
| bool | scanEol |
| bool | scanToEND |
| int | fieldflag |
| double | CurrentScale |
Additional Inherited Members | |
Protected Member Functions inherited from Parsers::LayoutFile | |
| virtual int | Parse () |
| Parseer function. More... | |
| virtual void | ParseError (const char *m) |
| Parse error handler. More... | |
| virtual int | Parse ()=0 |
| The parser itself, supplied by derived classes. More... | |
| virtual void | ParseError (const char *)=0 |
| The parser's error handler, supplied by derived classes. More... | |
Protected Attributes inherited from Parsers::LayoutFile | |
| MRRXtrkCad * | parser |
| Parser. More... | |
| TrackGraph * | trackGraph |
| Track graph, a graph of all of the trackwork in the layput file. More... | |
Protected Attributes inherited from Parsers::ParseFile | |
| char * | lp |
| Input line buffer pointer. More... | |
| FILE * | fp |
| Input file pointer. More... | |
| int | source_line |
| Source line number. More... | |
| char | line_buffer [buffersize] |
| Input line buffer. More... | |
| ostream * | errorstream |
| Stream for error reporting. More... | |
| char * | source_file |
| Name of the source file. More... | |
Static Protected Attributes inherited from Parsers::ParseFile | |
| static const int | buffersize = 1024 |
| Size of line buffer. More... | |
MRRXtrkCad parser class.
Include MRRXtrkCad.tab.h to get this class (the docs are wrong).
| Parsers::MRRXtrkCad::MRRXtrkCad | ( | const char * | filename | ) |
The constructor function.
The constructor is the only function that is directly called from user code. See LayoutFile for all other access methods.
|
inlinevirtual |
|
private |
|
virtual |
|
private |
|
virtual |
| int Parsers::MRRXtrkCad::yyparse | ( | void | ) |
|
private |
|
private |
|
private |
|
private |
| int Parsers::MRRXtrkCad::yychar |
| int Parsers::MRRXtrkCad::yydebug |
| yyltype Parsers::MRRXtrkCad::yylloc |
| yy_MRRXtrkCad_stype Parsers::MRRXtrkCad::yylval |
| int Parsers::MRRXtrkCad::yynerrs |