71 ! dynamic_cast<BeamSequence *>(
object)) {
73 (*this)(
object->getParent());
107 (*this)(
object->getParent());
115 using namespace SaveNS;
124 "The \"SAVE\" statement prints a list of all definitions,\n"
125 "starting with constants, variables, and vectors,"
126 "followed by elements, and finally all sequences.") {
128 (
"FILE",
"Name of file to be written",
"SAVE");
144 return new Save(name,
this);
150 std::ofstream os(file.c_str());
154 "Unable to open output stream \"" + file +
"\".");
164 std::string comchar =
"// ";
170 os << comchar <<
"<Parameter definitions> ;" <<
std::endl ;
172 os << comchar <<
"</Parameter definitions> ;"
175 os << comchar <<
"<Element definitions> ;" <<
std::endl ;
177 os << comchar <<
"</Element definitions> ;"
180 os << comchar <<
"<Line (and split element) definitions> ;"
183 os << comchar <<
"</Line (and split element) definitions> ;"
186 os << comchar <<
"<Special definitions> ;" <<
std::endl ;
188 os << comchar <<
"</Special definitions> ;"
ParameterWriter(std::ostream &ostr)
bool isFlagged() const
True, if [b]this[/b] is flagged by setFlag(true).
virtual void parseShortcut(Statement &)
Parser for single-attribute commands.
The base class for all OPAL definitions.
The base class for all OPAL actions.
bool isBuiltin() const
True, if [b]this[/b] is a built-in object.
The base class for all OPAL exceptions.
virtual void operator()(Object *) const
The function to be executed.
Object * getParent() const
Return parent pointer.
void parse(Statement &)
Parse command (special for one-attribute command).
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual void operator()(Object *) const
The function to be executed.
void apply(const ObjectFunction &)
Apply a function to all objects.
virtual Save * clone(const std::string &name)
Make clone.
static OpalData * getInstance()
const std::string & getOpalName() const
Return object name.
virtual void operator()(Object *) const
The function to be executed.
The base class for all OPAL elements.
Interface for statements.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
#define OPAL_PROJECT_VERSION
ElementWriter(std::ostream &ostr)
The base class for all OPAL objects.
Save()
Exemplar constructor.
virtual void execute()
Execute the command.
The base class for all OPAL value definitions.
std::string getGitRevision()
Abstract base class for functor objects whose argument is an Object.
virtual void operator()(Object *) const
The function to be executed.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
void setFlag(bool)
Flag/unflag this object, e. g. to control output of objects for.
SpecialWriter(std::ostream &ostr)
Inform & endl(Inform &inf)
std::string getString(const Attribute &attr)
Get string value.