Go to the documentation of this file.
102 string method =
"OperationSerializer::writeState()";
103 string msg =
"Problems writing the state: " + e.
errorMessage();
125 string method =
"OperationSerializer::readState()";
126 string msg =
"Problems reading the state: " + e.
errorMessage();
132 return operationState;
150 for (
int i = 0; i < state->
childCount(); i++) {
216 for (
int i = 0; i < state->
childCount(); i++) {
273 for (
int j = 0; j < canSwap->
childCount(); j++) {
297 string msg =
"Error while constructing ObjectState tree: " +
320 for (
int i = 0; i < state->
childCount(); i++) {
339 for (
int i = 0; i < state->
childCount(); i++) {
491 string msg =
"Error while constructing ObjectState tree" +
512 for (
int childIndex = 0; childIndex < source->
childCount();
const string OPSER_VERSION
XML tag for version.
static const std::string OPRND_ELEM_COUNT
Object state name for element count.
const string LIBRARY_NAME
Name of the library.
ObjectState * toOperation(const ObjectState *state)
bool hasAttribute(const std::string &name) const
static const std::string OPRND_MEM_DATA
Object state name for memory data.
std::string stringAttribute(const std::string &name) const
XMLSerializer serializer_
Constructs the ObjectState tree from the XML file.
void setSourceFile(const std::string &fileName)
static const std::string OPRND_MEM_ADDRESS
Object state name for memory address.
virtual void writeState(const ObjectState *state)
static const std::string OPRND_MEM_UNITS
Object state name for memory unit count.
static const char * OPRN_IN
Object state name for input operand.
void setDestinationFile(const std::string &filename)
ObjectState * convertToOperationFormat(const ObjectState *state)
virtual ~OperationSerializer()
ObjectState * convertToXMLFormat(const ObjectState *state)
static const char * OPRN_NAME
Object state name for name.
static const std::string OPRND_CAN_SWAP
Object state name for can swap.
void setCause(const Exception &cause)
const double VERSION_NUMBER
The version number.
void setOperandProperties(ObjectState *operand, ObjectState *source)
static const char * OPRN_CONTROL_FLOW
Object state name for control flow property.
static const char * OPRN_DESCRIPTION
Object state name for description.
static const std::string OPRND_ID
Object state name for operand id.
static const char * OPRN_TRAP
Object state name for trap.
void setSchemaFile(const std::string &fileName)
const string OPSER_OSAL
XML tag for the module.
ObjectState * toXMLFormat(const ObjectState *state)
virtual ObjectState * readState()
virtual ObjectState * readState()
static const char * OPRN_OPERATION
Object state name for operation.
static const char * OPRN_CLOCKED
Object state name for clockedness.
void setDestinationFile(const std::string &fileName)
static const char * OPRN_ISCALL
Object state name for call property.
static std::string schemaDirPath(const std::string &prog)
ObjectState * child(int index) const
void addChild(ObjectState *child)
static const char * OPRN_WRITES_MEMORY
Object state name for writes memory.
void setSchemaFile(const std::string &filename)
void setUseSchema(bool useSchema)
void setSourceFile(const std::string &filename)
static const char * OPRN_READS_MEMORY
Object state name for reads memory.
static const std::string OPRND_IN
Object state name for input operand.
void setUseSchema(bool useSchema)
static const char * OPRN_OUT
Object state name for output operand.
std::string errorMessage() const
static const char * OPRN_INPUTS
Object state name for inputs.
static const std::string DIRECTORY_SEPARATOR
static const std::string OPRND_TYPE
Object state name for operand type.
static const char * OPRN_SIDE_EFFECTS
Object state name for side effects.
static const std::string OPRND_ELEM_WIDTH
Object state name for element width.
static bool fileExists(const std::string fileName)
bool boolAttribute(const std::string &name) const
const string SCHEMA_FILE_NAME
Schema file name.
std::string stringValue() const
int intAttribute(const std::string &name) const
void setValue(const std::string &value)
static const char * OPRN_ISBRANCH
Object state name for branch property.
static const char * OPRN_OUTPUTS
Object state name for outputs.
void setAttribute(const std::string &name, const std::string &value)
virtual void writeState(const ObjectState *rootState)