OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Private Types | Private Attributes | List of all members
PlaceRep Class Reference

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 PlaceRepoperator= (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
 

Detailed Description

Representation of a place within a beam line or sequence.

Definition at line 41 of file PlaceRep.h.

Member Typedef Documentation

◆ Data

typedef std::vector<std::pair<std::string, int> > PlaceRep::Data
private

Definition at line 87 of file PlaceRep.h.

Constructor & Destructor Documentation

◆ PlaceRep() [1/3]

PlaceRep::PlaceRep ( )

Default constructor.

Definition at line 29 of file PlaceRep.cpp.

References initialize().

Here is the call graph for this function:

◆ PlaceRep() [2/3]

PlaceRep::PlaceRep ( const std::string &  def)
explicit

Construct default place.

Definition at line 41 of file PlaceRep.cpp.

References append(), and initialize().

Here is the call graph for this function:

◆ PlaceRep() [3/3]

PlaceRep::PlaceRep ( const PlaceRep rhs)

Definition at line 35 of file PlaceRep.cpp.

References initialize().

Here is the call graph for this function:

◆ ~PlaceRep()

PlaceRep::~PlaceRep ( )

Definition at line 48 of file PlaceRep.cpp.

Member Function Documentation

◆ append()

void PlaceRep::append ( const std::string &  name,
int  occur 
)

Add a name/occurrence pair.

Definition at line 59 of file PlaceRep.cpp.

References data, and name.

Referenced by Expressions::parsePlace(), and PlaceRep().

◆ enter()

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().

Here is the call graph for this function:

◆ initialize()

void PlaceRep::initialize ( )

Initialise data for search.

Definition at line 64 of file PlaceRep.cpp.

References seen, and status.

Referenced by RangeRep::initialize(), operator=(), and PlaceRep().

◆ isActive()

bool PlaceRep::isActive ( ) const

Return status.

Definition at line 98 of file PlaceRep.cpp.

References status.

Referenced by RangeRep::enter(), and RangeRep::leave().

◆ isSelected()

bool PlaceRep::isSelected ( ) const

Return select flag.

Definition at line 103 of file PlaceRep.cpp.

References is_selected.

◆ leave()

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().

Here is the call graph for this function:

◆ operator=()

const PlaceRep & PlaceRep::operator= ( const PlaceRep rhs)

Definition at line 52 of file PlaceRep.cpp.

References data, and initialize().

Here is the call graph for this function:

◆ print()

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().

Member Data Documentation

◆ data

Data PlaceRep::data
private

Definition at line 88 of file PlaceRep.h.

Referenced by append(), enter(), leave(), operator=(), and print().

◆ is_selected

bool PlaceRep::is_selected
private

Definition at line 91 of file PlaceRep.h.

Referenced by isSelected().

◆ seen

Data::size_type PlaceRep::seen
mutableprivate

Definition at line 97 of file PlaceRep.h.

Referenced by enter(), initialize(), and leave().

◆ status

bool PlaceRep::status
mutableprivate

Definition at line 94 of file PlaceRep.h.

Referenced by enter(), initialize(), isActive(), and leave().


The documentation for this class was generated from the following files: