OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
TrackParser.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: TrackParser.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: TrackParser
10 // The parser class for the OPAL tracking module.
11 //
12 // ------------------------------------------------------------------------
13 //
14 // $Date: 2000/03/27 09:33:46 $
15 // $Author: Andreas Adelmann $
16 //
17 // ------------------------------------------------------------------------
18 
19 #include "Track/TrackParser.h"
20 #include "Track/TrackEnd.h"
21 #include "Track/TrackRun.h"
22 #include "Track/TrackSave.h"
23 #include "Track/TrackStart.h"
24 
25 
26 // Class TrackParser
27 // ------------------------------------------------------------------------
28 
29 
31  trackDirectory() {
32  trackDirectory.insert("ENDTRACK", new TrackEnd());
33  //trackDirectory.insert("NOISE", new TrackNoise());
34  trackDirectory.insert("RUN", new TrackRun());
35  trackDirectory.insert("TSAVE", new TrackSave());
36  trackDirectory.insert("START", new TrackStart());
37 }
38 
39 
41 {}
42 
43 
44 Object *TrackParser::find(const std::string &name) const {
45  return trackDirectory.find(name);
46 }
The START command.
Definition: TrackStart.h:28
The RUN command.
Definition: TrackRun.h:38
virtual Object * find(const std::string &) const
Find object by name in the track command directory.
Definition: TrackParser.cpp:44
The TSAVE command.
Definition: TrackSave.h:28
Directory trackDirectory
Definition: TrackParser.h:51
The ENDTRACK command.
Definition: TrackEnd.h:31
virtual ~TrackParser()
Definition: TrackParser.cpp:40
Object * find(const std::string &name) const
Find entry.
Definition: Directory.cpp:66
void insert(const std::string &name, Object *newObject)
Define new object.
Definition: Directory.cpp:77
The base class for all OPAL objects.
Definition: Object.h:48
const std::string name