OpenASIP
2.0
|
#include <OSEdOptionsSerializer.hh>
Public Member Functions | |
OSEdOptionsSerializer () | |
virtual | ~OSEdOptionsSerializer () |
virtual void | writeState (const ObjectState *state) |
virtual ObjectState * | readState () |
void | setSourceFile (const std::string &fileName) |
void | setDestinationFile (const std::string &fileName) |
void | setSchemaFile (const std::string &fileName) |
void | setUseSchema (bool useSchema) |
![]() | |
virtual | ~Serializer () |
Private Member Functions | |
OSEdOptionsSerializer (const OSEdOptionsSerializer &) | |
Copying not allowed. More... | |
OSEdOptionsSerializer & | operator= (const OSEdOptionsSerializer &) |
Assignment not allowed. More... | |
Private Attributes | |
XMLSerializer | serializer_ |
Instance of XMLSerializer. More... | |
Constructs the ObjectState tree that represents the options of OSEd.
Definition at line 44 of file OSEdOptionsSerializer.hh.
OSEdOptionsSerializer::OSEdOptionsSerializer | ( | ) |
|
virtual |
|
private |
Copying not allowed.
|
private |
Assignment not allowed.
|
virtual |
Reads the options file and returns the corresponding ObjectState tree.
Implements TCETools::Serializer.
Definition at line 71 of file OSEdOptionsSerializer.cc.
References Exception::errorMessage(), XMLSerializer::readState(), and serializer_.
Referenced by OSEd::OnInit().
void OSEdOptionsSerializer::setDestinationFile | ( | const std::string & | fileName | ) |
Sets the destination file.
fileName | The name of the file. |
Definition at line 99 of file OSEdOptionsSerializer.cc.
References serializer_, and XMLSerializer::setDestinationFile().
Referenced by OSEd::createDefaultOptions(), and OSEdOptionsDialog::onSave().
void OSEdOptionsSerializer::setSchemaFile | ( | const std::string & | fileName | ) |
Sets the schema file.
fileName | The name of the file. |
Definition at line 109 of file OSEdOptionsSerializer.cc.
References serializer_, and XMLSerializer::setSchemaFile().
void OSEdOptionsSerializer::setSourceFile | ( | const std::string & | fileName | ) |
Sets the source file.
fileName | The name of the file. |
Definition at line 89 of file OSEdOptionsSerializer.cc.
References serializer_, and XMLSerializer::setSourceFile().
Referenced by OSEd::OnInit().
void OSEdOptionsSerializer::setUseSchema | ( | bool | useSchema | ) |
Modifies the usage of schema file (yes/no).
useSchema | True or false, depending on if schema should be used or not. |
Definition at line 119 of file OSEdOptionsSerializer.cc.
References serializer_, and XMLSerializer::setUseSchema().
|
virtual |
Writes the object state tree to XML file.
state | State to be written. |
Implements TCETools::Serializer.
Definition at line 55 of file OSEdOptionsSerializer.cc.
References Exception::errorMessage(), serializer_, and XMLSerializer::writeState().
Referenced by OSEd::createDefaultOptions(), and OSEdOptionsDialog::onSave().
|
private |
Instance of XMLSerializer.
Definition at line 64 of file OSEdOptionsSerializer.hh.
Referenced by readState(), setDestinationFile(), setSchemaFile(), setSourceFile(), setUseSchema(), and writeState().