frepple::CommandSave Class Reference

This command writes the complete model to an XML-file. More...

#include <model.h>

Inheritance diagram for frepple::CommandSave:
frepple::utils::Command

List of all members.

Public Member Functions

 CommandSave (const string &v="plan.out")
void execute ()
XMLOutput::content_type getContent () const
string getFileName () const
string getHeaderAtts () const
string getHeaderStart () const
void setContent (XMLOutput::content_type t)
void setFileName (const string &v)
void setHeaderAtts (const string &s)
void setHeaderStart (const string &s)
virtual ~CommandSave ()

Static Public Member Functions

static PyObject * executePython (PyObject *, PyObject *)

Detailed Description

This command writes the complete model to an XML-file.

Both the static model (i.e. items, locations, buffers, resources, calendars, etc...) and the dynamic data (i.e. the actual plan including the operationplans, demand, problems, etc...).
The format is such that the output file can be re-read to restore the very same model.
The data is written by the execute() function.

See also:
CommandSavePlan

Definition at line 4342 of file model.h.


Constructor & Destructor Documentation

frepple::CommandSave::CommandSave ( const string &  v = "plan.out"  )  [inline]

Constructor.

Definition at line 4346 of file model.h.

virtual frepple::CommandSave::~CommandSave (  )  [inline, virtual]

Destructor.

Definition at line 4350 of file model.h.


Member Function Documentation

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

Execute the command, ie write the data into XML format.

Implements frepple::utils::Command.

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

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

Python interface to this command.

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

XMLOutput::content_type frepple::CommandSave::getContent (  )  const [inline]

Return the type of output.

Definition at line 4365 of file model.h.

string frepple::CommandSave::getFileName (  )  const [inline]

Return the name of the output file.

Definition at line 4353 of file model.h.

string frepple::CommandSave::getHeaderAtts (  )  const [inline]

Returns the attributes that are written for the root element of each XML document.

Definition at line 4391 of file model.h.

string frepple::CommandSave::getHeaderStart (  )  const [inline]

Returns the string that is printed as the first line of each XML document.

Definition at line 4381 of file model.h.

void frepple::CommandSave::setContent ( XMLOutput::content_type  t  )  [inline]

Update the type of output.

See also:
XMLOutput::content_type

Definition at line 4370 of file model.h.

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

Update the name of the output file.

Definition at line 4356 of file model.h.

void frepple::CommandSave::setHeaderAtts ( const string &  s  )  [inline]

Updates the attributes that are written for the root element of each XML document.
The default value is an empty string.

Definition at line 4387 of file model.h.

void frepple::CommandSave::setHeaderStart ( const string &  s  )  [inline]

Updates the string that is printed as the first line of each XML document.
The default value is: <?xml version="1.0" encoding="UTF-8"?>

Definition at line 4377 of file model.h.


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

Generated on 16 Apr 2010 for frePPLe by  doxygen 1.6.1