OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
EmissionSourceList.h
Go to the documentation of this file.
1//
2// Class EmissionSourceList
3// The EMISSIONSOURCELIST definition. A named list of EmissionSource
4// elements, buildable like a Line: name: EMISSIONSOURCELIST = (ES1, ES2, ...).
5//
6// Copyright (c) 200x - 2022, Paul Scherrer Institut, Villigen PSI, Switzerland
7// All rights reserved
8//
9// This file is part of OPAL.
10//
11// OPAL is free software: you can redistribute it and/or modify
12// it under the terms of the GNU General Public License as published by
13// the Free Software Foundation, either version 3 of the License, or
14// (at your option) any later version.
15//
16// You should have received a copy of the GNU General Public License
17// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
18//
19#ifndef OPAL_EMISSIONSOURCELIST_HH
20#define OPAL_EMISSIONSOURCELIST_HH
21
24
25#include <vector>
26
27class Statement;
28
30public:
33
34 virtual ~EmissionSourceList();
35
36 virtual bool canReplaceBy(Object* object);
37 virtual EmissionSourceList* clone(const std::string& name);
38 virtual void execute();
39
40 virtual void parse(Statement& stat);
41
42 static EmissionSourceList* find(const std::string& name);
43
45 const std::vector<EmissionSource*>& fetchSources() const { return sources_m; }
46
47private:
50
51 EmissionSourceList(const std::string& name, EmissionSourceList* parent);
52
53 void parseList(Statement& stat);
54
55 std::vector<EmissionSource*> sources_m;
56};
57
58#endif // OPAL_EMISSIONSOURCELIST_HH
The base class for all OPAL definitions.
Definition Definition.h:29
virtual void parse(Statement &stat)
Parse the object.
EmissionSourceList(const EmissionSourceList &)
EmissionSourceList()
Exemplar constructor.
virtual EmissionSourceList * clone(const std::string &name)
Return a clone.
static EmissionSourceList * find(const std::string &name)
std::vector< EmissionSource * > sources_m
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
virtual void execute()
Execute the command.
const std::vector< EmissionSource * > & fetchSources() const
Return the list of EmissionSource pointers. Valid after parse/execute.
void operator=(const EmissionSourceList &)
void parseList(Statement &stat)
The base class for all OPAL objects.
Definition Object.h:45
Interface for statements.
Definition Statement.h:37