31 const std::string &clsName,
const std::string &typName,
32 const std::string &pattern):
34 itsClass(0), itsType(typName), itsPattern(0), itsCount(0) {
37 std::cerr <<
"\n### Warning ### Unknown class name \""
38 << clsName <<
"\"; will select all classes.\n" <<
std::endl;
42 if(! pattern.empty()) {
Representation of a range within a beam line or sequence.
RangeRep itsRange
Working data for range.
ElementBase * getElement() const
Get the element pointer.
An abstract sequence of beam line components.
virtual void execute()
Execute the algorithm.
virtual const std::string & getName() const
Get element name.
Inform & endl(Inform &inf)
void setSelectionFlag(bool flag) const
Get selection flag.
const std::string itsType
const std::string getTypeName() const
Return the element's type name.
set(_SRCS Action.cpp Attribute.cpp AttributeBase.cpp AttributeHandler.cpp BeamSequence.cpp Definition.cpp Directory.cpp Element.cpp Invalidator.cpp OpalData.cpp Object.cpp ObjectFunction.cpp PlaceRep.cpp RangeRep.cpp Table.cpp TableRowRep.cpp ValueDefinition.cpp) include_directories($
bool match(const std::string &s) const
Match a string against the pattern.
virtual void execute()
Execute the selection.
static Element * find(const std::string &name)
Find named Element.
bool isActive() const
Test for active range.
int getCount() const
Return the count of selected elements.
bool isTreeMember(const Object *subTree) const
Test for tree membership.
A section of a beam line.
virtual void handleElement(const FlaggedElmPtr &)
The operation to be done for elements.
const RegularExpression * itsPattern