![]() |
stromx
0.8.0
|
Writer for stromx files. More...
#include <XmlWriter.h>
Public Member Functions | |
| void | writeStream (const std::string &filepath, const Stream &stream) const |
| void | writeStream (FileOutput &output, const std::string &basename, const Stream &stream) const |
| void | writeParameters (const std::string &filepath, const std::vector< const stromx::runtime::Operator *> &operators) const |
| void | writeParameters (const std::string &filepath, const std::vector< stromx::runtime::Operator *> &operators) const |
| void | writeParameters (FileOutput &output, const std::string &basename, const std::vector< const stromx::runtime::Operator *> &operators) const |
| void | writeParameters (FileOutput &output, const std::string &basename, const std::vector< stromx::runtime::Operator *> &operators) const |
Writer for stromx files.
Stromx can read and write stream and parameter files. A stream file contains all the operators, connections and threads of a stream. In addition, the settings of the parameters of each operator are stored. A parameter file contains the parameter settings of a list of operator. It can be used to set the parameters of an existing stream without changing its connections or threads.
Both stream and parameter files are XML files. Additionally, they can refer to dependend files which contain parameter information which should not be encoded as XML (such as image data). Thus the stream and parameter XML files are actually part of file bundles which are either stored in a common directory or in a zip archive. In the first case the path of the file is the path of XML file contained in the same directory as the dependend files. In the second case it is the path of zip file which contains the XML file and the dependend files. Zip files can also have the custom extension *.stromx.
Stream and parameter files can also be written to file outputs. File outputs are an abstraction of the file bundles mentioned above and are represented by a FileOutput object. This allows the user to implement custom ways to store file bundles, e.g. in a database or using a different archive format.
| void stromx::runtime::XmlWriter::writeParameters | ( | const std::string & | filepath, |
| const std::vector< const stromx::runtime::Operator *> & | operators | ||
| ) | const |
Writes a parameter file.
| filepath | The path of the file. Any existing file is overwritten. |
| operators | The operators whose parameter settings are written to the file. |
| FileException | The base name of the file name is empty or the file extension is unknown. |
| SerializationError | Failed to serialize data referenced in the XML file. |
| void stromx::runtime::XmlWriter::writeParameters | ( | const std::string & | filepath, |
| const std::vector< stromx::runtime::Operator *> & | operators | ||
| ) | const |
Writes a parameter file.
| filepath | The path of the file. Any existing file is overwritten. |
| operators | The operators whose parameter settings are written to the file. |
| FileException | The base name of the file name is empty or the file extension is unknown. |
| SerializationError | Failed to serialize data referenced in the XML file. |
| void stromx::runtime::XmlWriter::writeParameters | ( | FileOutput & | output, |
| const std::string & | basename, | ||
| const std::vector< const stromx::runtime::Operator *> & | operators | ||
| ) | const |
Writes a parameter file to a file output
| basename | The common first part of the name of all files which are written to the file output. |
| operators | The operators whose parameter settings are written to the file. |
| WrongArgument | The base name of the file name is empty. |
| SerializationError | Failed to serialize data referenced in the XML file. |
| void stromx::runtime::XmlWriter::writeParameters | ( | FileOutput & | output, |
| const std::string & | basename, | ||
| const std::vector< stromx::runtime::Operator *> & | operators | ||
| ) | const |
Writes a parameter file to a file output
| basename | The common first part of the name of all files which are written to the file output. |
| operators | The operators whose parameter settings are written to the file. |
| WrongArgument | The base name of the file name is empty. |
| SerializationError | Failed to serialize data referenced in the XML file. |
| void stromx::runtime::XmlWriter::writeStream | ( | const std::string & | filepath, |
| const Stream & | stream | ||
| ) | const |
Writes a stream file. The file can be either an XML or a zip file.
| filepath | The path of the file. Any existing file is overwritten. |
| stream | The stream to write. |
| FileException | The base name of the file name is empty or the file extension is unknown. |
| SerializationError | Failed to serialize data referenced in the XML file. |
| void stromx::runtime::XmlWriter::writeStream | ( | FileOutput & | output, |
| const std::string & | basename, | ||
| const Stream & | stream | ||
| ) | const |
Writes a stream file to a file output.
| output | The file output which receives the stream file. |
| basename | The common first part of the name of all files which are written to the file output. |
| stream | The stream to write. |
| FileException | The base name of the file name is empty or the file extension is unknown. |
| SerializationError | Failed to serialize data referenced in the XML file. |
1.8.12