OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
Representation of a place within a beam line or sequence. More...
#include <PlaceRep.h>
Public Member Functions | |
PlaceRep () | |
Default constructor. More... | |
PlaceRep (const std::string &) | |
Construct default place. More... | |
PlaceRep (const PlaceRep &) | |
~PlaceRep () | |
const PlaceRep & | operator= (const PlaceRep &) |
void | append (const std::string &, int occur) |
Add a name/occurrence pair. More... | |
void | initialize () |
Initialise data for search. More... | |
void | enter (const FlaggedElmPtr &) const |
Enter an element or line. More... | |
void | leave (const FlaggedElmPtr &) const |
Leave an element or line. More... | |
bool | isActive () const |
Return status. More... | |
bool | isSelected () const |
Return select flag. More... | |
void | print (std::ostream &os) const |
Print in input format. More... | |
Private Types | |
typedef std::vector< std::pair< std::string, int > > | Data |
Private Attributes | |
Data | data |
bool | is_selected |
bool | status |
Data::size_type | seen |
Representation of a place within a beam line or sequence.
Definition at line 41 of file PlaceRep.h.
|
private |
Definition at line 87 of file PlaceRep.h.
PlaceRep::PlaceRep | ( | ) |
Default constructor.
Definition at line 29 of file PlaceRep.cpp.
References initialize().
|
explicit |
Construct default place.
Definition at line 41 of file PlaceRep.cpp.
References append(), and initialize().
PlaceRep::PlaceRep | ( | const PlaceRep & | rhs | ) |
Definition at line 35 of file PlaceRep.cpp.
References initialize().
PlaceRep::~PlaceRep | ( | ) |
Definition at line 48 of file PlaceRep.cpp.
void PlaceRep::append | ( | const std::string & | name, |
int | occur | ||
) |
Add a name/occurrence pair.
Definition at line 59 of file PlaceRep.cpp.
Referenced by Expressions::parsePlace(), and PlaceRep().
void PlaceRep::enter | ( | const FlaggedElmPtr & | fep | ) | const |
Enter an element or line.
Definition at line 70 of file PlaceRep.cpp.
References data, FlaggedElmPtr::getCounter(), ElmPtr::getElement(), ElementBase::getName(), name, seen, and status.
Referenced by RangeRep::enter().
void PlaceRep::initialize | ( | ) |
Initialise data for search.
Definition at line 64 of file PlaceRep.cpp.
Referenced by RangeRep::initialize(), operator=(), and PlaceRep().
bool PlaceRep::isActive | ( | ) | const |
Return status.
Definition at line 98 of file PlaceRep.cpp.
References status.
Referenced by RangeRep::enter(), and RangeRep::leave().
bool PlaceRep::isSelected | ( | ) | const |
void PlaceRep::leave | ( | const FlaggedElmPtr & | fep | ) | const |
Leave an element or line.
Definition at line 84 of file PlaceRep.cpp.
References data, FlaggedElmPtr::getCounter(), ElmPtr::getElement(), ElementBase::getName(), name, seen, and status.
Referenced by RangeRep::leave().
Definition at line 52 of file PlaceRep.cpp.
References data, and initialize().
void PlaceRep::print | ( | std::ostream & | os | ) | const |
Print in input format.
Definition at line 108 of file PlaceRep.cpp.
References data.
Referenced by operator<<(), and RangeRep::print().
|
private |
Definition at line 88 of file PlaceRep.h.
Referenced by append(), enter(), leave(), operator=(), and print().
|
private |
Definition at line 91 of file PlaceRep.h.
Referenced by isSelected().
|
mutableprivate |
Definition at line 97 of file PlaceRep.h.
Referenced by enter(), initialize(), and leave().
|
mutableprivate |
Definition at line 94 of file PlaceRep.h.
Referenced by enter(), initialize(), isActive(), and leave().