OPAL (Object Oriented Parallel Accelerator Library)
2022.1
OPAL
src
src
Track
TrackParser.cpp
Go to the documentation of this file.
1
//
2
// Class TrackParser
3
// The parser class used by the OPAL tracking module.
4
// As long as control remains in this class, OPAL recognizes only the
5
// commands allowed in tracking mode. Thus this parser has its own
6
// command directory with a find() method which is used to find commands.
7
//
8
// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
9
// All rights reserved
10
//
11
// This file is part of OPAL.
12
//
13
// OPAL is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation, either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20
//
21
#include "
Track/TrackParser.h
"
22
#include "
Track/TrackEnd.h
"
23
#include "
Track/TrackRun.h
"
24
25
TrackParser::TrackParser
():
26
trackDirectory() {
27
trackDirectory
.
insert
(
"ENDTRACK"
,
new
TrackEnd
());
28
trackDirectory
.
insert
(
"RUN"
,
new
TrackRun
());
29
}
30
31
32
TrackParser::~TrackParser
()
33
{}
34
35
36
Object
*
TrackParser::find
(
const
std::string &
name
)
const
{
37
return
trackDirectory
.
find
(
name
);
38
}
TrackEnd.h
TrackParser.h
TrackRun.h
name
const std::string name
Definition:
MaxNormRadialPeak.cpp:32
Directory::find
Object * find(const std::string &name) const
Find entry.
Definition:
Directory.cpp:66
Directory::insert
void insert(const std::string &name, Object *newObject)
Define new object.
Definition:
Directory.cpp:77
Object
The base class for all OPAL objects.
Definition:
Object.h:48
TrackEnd
The ENDTRACK command.
Definition:
TrackEnd.h:30
TrackParser::TrackParser
TrackParser()
Definition:
TrackParser.cpp:25
TrackParser::~TrackParser
virtual ~TrackParser()
Definition:
TrackParser.cpp:32
TrackParser::trackDirectory
Directory trackDirectory
Definition:
TrackParser.h:47
TrackParser::find
virtual Object * find(const std::string &) const
Find object by name in the track command directory.
Definition:
TrackParser.cpp:36
TrackRun
Definition:
TrackRun.h:38
Generated on Thu Oct 20 2022 17:40:12 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.3