49 "The \"SELECT\" sub-command marks element(s) in the sequence "
50 "to be affected by subsequent edit sub-commands") {
52 (
"RANGE",
"Range to be considered for selection");
54 (
"CLASS",
"Class of elements to be selected within range");
56 (
"TYPE",
"The element \"TYPE\" attribute.");
58 (
"PATTERN",
"Regular expression for name matching");
60 (
"FULL",
"If true, all element are selected");
62 (
"CLEAR",
"If true, all selections are cleared");
87 std::cerr <<
"\nAll elements selected.\n";
93 std::cerr <<
"\nAll elements de-selected.\n";
106 std::cerr <<
"\nNo elements";
107 }
else if(count == 1) {
108 std::cerr <<
"\n1 element";
110 std::cerr <<
'\n' << count <<
" elements";
113 std::cerr <<
" selected.\n";
RangeRep getRange(const Attribute &attr)
Get range value.
The sequence editor SELECT command.
Attribute makeRange(const std::string &name, const std::string &help)
Create a range attribute.
void selectClear()
Clear all selection flags.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
void selectFull()
Set all selection flags.
The base class for all OPAL sequence editor commands.
bool getBool(const Attribute &attr)
Return logical value.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
static Edit * block
Pointer to the edit data.
Representation of a range within a beam line or sequence.
virtual void execute()
Execute the command.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
virtual EditSelect * clone(const std::string &name)
Make clone.
int select(const RangeRep &rng, const std::string &cls, const std::string &typ, const std::string &patt)
Select elements in the edit sequence.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
EditSelect()
Exemplar constructor.
Inform & endl(Inform &inf)
std::string getString(const Attribute &attr)
Get string value.