46 "The \"MOVE\" sub-command moves element(s) in the sequence "
49 (
"SELECTED",
"If true, all selected elements are moved");
51 (
"ELEMENT",
"Name of single element to be moved");
53 (
"BY",
"Amount in m by which elements should be moved");
55 (
"TO",
"New position in m relative to origin");
57 (
"FROM",
"Name of element defining the origin (default is start)");
98 std::cerr <<
"\nNo element";
99 }
else if(count == 1) {
100 std::cerr <<
"\n1 element";
102 std::cerr <<
'\n' << count <<
" elements";
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
The base class for all OPAL sequence editor commands.
bool getBool(const Attribute &attr)
Return logical value.
virtual EditMove * clone(const std::string &name)
Make clone.
PlaceRep getPlace(const Attribute &attr)
Get place value.
Representation of a place within a beam line or sequence.
int moveSingleAbs(const PlaceRep &, double to)
Move single element.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
The sequence editor MOVE command.
static Edit * block
Pointer to the edit data.
Attribute makePlace(const std::string &name, const std::string &help)
Create a place attribute.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
EditMove()
Exemplar constructor.
int moveSingleRel(const PlaceRep &, const PlaceRep &, double to)
Move single element.
double getReal(const Attribute &attr)
Return real value.
int moveMultiple(double by)
Move multiple elements.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Inform & endl(Inform &inf)
virtual void execute()
Execute the command.