frepple::CommandReadXMLFile Class Reference

This command is used for reading XML input. The input comes either from a flatfile, or from the standard input. More...

#include <model.h>

Inheritance diagram for frepple::CommandReadXMLFile:

frepple::utils::Command frepple::utils::Object

List of all members.


Public Member Functions

 CommandReadXMLFile (const string &s, bool v=true, bool o=false)
 CommandReadXMLFile (const char *s=NULL, bool v=true, bool o=false)
void endElement (XMLInput &, const Attribute &, const DataElement &)
void execute ()
string getDescription () const
string getFileName ()
virtual size_t getSize () const
virtual const MetaClassgetType () const
bool getValidate ()
bool getValidateOnly ()
void setFileName (const string &v)
void setValidate (bool b)
void setValidateOnly (bool b)

Static Public Member Functions

static PyObject * executePython (PyObject *, PyObject *)

Static Public Attributes

static const MetaClass metadata

Detailed Description

This command is used for reading XML input. The input comes either from a flatfile, or from the standard input.

The command is not thread-safe: multiple threads can simultaneously access the same objects.

Definition at line 3585 of file model.h.


Constructor & Destructor Documentation

frepple::CommandReadXMLFile::CommandReadXMLFile ( const char *  s = NULL,
bool  v = true,
bool  o = false 
) [inline]

Constructor. If no file or directory name is passed or specified later the standard input will be read during execution of the command.

Definition at line 3590 of file model.h.

frepple::CommandReadXMLFile::CommandReadXMLFile ( const string &  s,
bool  v = true,
bool  o = false 
) [inline]

Constructor.

Definition at line 3594 of file model.h.


Member Function Documentation

void frepple::CommandReadXMLFile::endElement ( XMLInput ,
const Attribute ,
const DataElement  
) [virtual]

Called while restoring the model from an XML-file. This is called when the corresponding close element tag is encountered, and the Data() member of pElement is also valid. NOTE: each object receives both its own beginElement so it can process its own element tag attributes, and its own endElement so it can process its own character data.

Reimplemented from frepple::utils::Command.

Definition at line 153 of file model/actions.cpp.

void frepple::CommandReadXMLFile::execute (  )  [virtual]

The commit action reads the input. If a filename is specified (either in the constructor or with the setFileName function), a flat file is read. Otherwise, the standard input is read.

Implements frepple::utils::Command.

Definition at line 164 of file model/actions.cpp.

PyObject * frepple::CommandReadXMLFile::executePython ( PyObject *  self,
PyObject *  args 
) [static]

Python interface for this command.

Definition at line 199 of file model/actions.cpp.

string frepple::CommandReadXMLFile::getDescription (  )  const [inline, virtual]

Reimplemented from frepple::utils::Command.

Definition at line 3626 of file model.h.

string frepple::CommandReadXMLFile::getFileName (  )  [inline]

Returns the name of the input file.

Definition at line 3601 of file model.h.

virtual size_t frepple::CommandReadXMLFile::getSize (  )  const [inline, virtual]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 3635 of file model.h.

virtual const MetaClass& frepple::CommandReadXMLFile::getType (  )  const [inline, virtual]

This returns the type information on the object, a bit similar to the standard type_info information.

Implements frepple::utils::Object.

Definition at line 3633 of file model.h.

bool frepple::CommandReadXMLFile::getValidate (  )  [inline]

Returns true if the schema validation has been enabled.

Definition at line 3607 of file model.h.

bool frepple::CommandReadXMLFile::getValidateOnly (  )  [inline]

Returns whether we only need to validate to data, or really execute them too.

Definition at line 3614 of file model.h.

void frepple::CommandReadXMLFile::setFileName ( const string &  v  )  [inline]

Update the name of the input file.

Definition at line 3598 of file model.h.

void frepple::CommandReadXMLFile::setValidate ( bool  b  )  [inline]

Enables or disables the validation.

Definition at line 3604 of file model.h.

void frepple::CommandReadXMLFile::setValidateOnly ( bool  b  )  [inline]

Only validate the input, do not really execute it.

Definition at line 3610 of file model.h.


Member Data Documentation

Reimplemented from frepple::utils::Command.

Definition at line 3634 of file model.h.


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

Documentation generated by  doxygen