OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OperationSerializer Class Reference

#include <OperationSerializer.hh>

Inheritance diagram for OperationSerializer:
Inheritance graph
Collaboration diagram for OperationSerializer:
Collaboration graph

Public Member Functions

 OperationSerializer ()
 
virtual ~OperationSerializer ()
 
virtual void writeState (const ObjectState *state)
 
virtual ObjectStatereadState ()
 
void setSourceFile (const std::string &filename)
 
void setDestinationFile (const std::string &filename)
 
void setSchemaFile (const std::string &filename)
 
void setUseSchema (bool useSchema)
 
- Public Member Functions inherited from TCETools::Serializer
virtual ~Serializer ()
 

Private Member Functions

 OperationSerializer (const OperationSerializer &)
 Copying not allowed. More...
 
OperationSerializeroperator= (const OperationSerializer &)
 Assignment not allowed. More...
 
ObjectStateconvertToXMLFormat (const ObjectState *state)
 
ObjectStateconvertToOperationFormat (const ObjectState *state)
 
ObjectStatetoOperation (const ObjectState *state)
 
ObjectStatetoXMLFormat (const ObjectState *state)
 
void setOperandProperties (ObjectState *operand, ObjectState *source)
 

Private Attributes

XMLSerializer serializer_
 Constructs the ObjectState tree from the XML file. More...
 

Detailed Description

Class that constructs an ObjectState tree that represents the information contents of an operation module from a given external file.

Definition at line 49 of file OperationSerializer.hh.

Constructor & Destructor Documentation

◆ OperationSerializer() [1/2]

OperationSerializer::OperationSerializer ( )

Constructor.

If schema file is found it is used.

Definition at line 67 of file OperationSerializer.cc.

67  : Serializer() {
68 
70  if (path != "") {
71  string schema = path + FileSystem::DIRECTORY_SEPARATOR +
73  if (FileSystem::fileExists(schema)) {
74  setSchemaFile(schema);
75  setUseSchema(true);
76  }
77  }
78 }

References FileSystem::DIRECTORY_SEPARATOR, FileSystem::fileExists(), LIBRARY_NAME, SCHEMA_FILE_NAME, Environment::schemaDirPath(), setSchemaFile(), and setUseSchema().

Here is the call graph for this function:

◆ ~OperationSerializer()

OperationSerializer::~OperationSerializer ( )
virtual

Destructor.

Definition at line 83 of file OperationSerializer.cc.

83  {
84 }

◆ OperationSerializer() [2/2]

OperationSerializer::OperationSerializer ( const OperationSerializer )
private

Copying not allowed.

Member Function Documentation

◆ convertToOperationFormat()

ObjectState * OperationSerializer::convertToOperationFormat ( const ObjectState state)
private

Converts ObjectState to more easily parseable format.

More easily parseable format is such that there are less nodes. Only children of the main node are the operands, affects, and affected-by nodes.

Parameters
stateObjectState to be converted.
Exceptions
ObjectStateLoadingExceptionIf ObjectState conversion fails.
Returns
The converted ObjectState tree.

Definition at line 318 of file OperationSerializer.cc.

318  {
319  ObjectState* operation = new ObjectState(OPSER_OSAL);
320  for (int i = 0; i < state->childCount(); i++) {
321  ObjectState* child = state->child(i);
322  operation->addChild(toOperation(child));
323  }
324  return operation;
325 }

References ObjectState::addChild(), ObjectState::child(), ObjectState::childCount(), OPSER_OSAL, and toOperation().

Referenced by readState().

Here is the call graph for this function:

◆ convertToXMLFormat()

ObjectState * OperationSerializer::convertToXMLFormat ( const ObjectState state)
private

Converts ObjectState to the format understood by XMLSerializer.

XMLSerializer needs an ObjectState tree in which each attribute is in its own node. ObjectState tree obtained form an operation is not in that format. This is why conversion is needed.

Parameters
stateObjectState to be converted.
Exceptions
ObjectStateLoadingExceptionIf ObjectState conversion fails.
Returns
The converted ObjectState tree.

Definition at line 147 of file OperationSerializer.cc.

147  {
148  ObjectState* operation = new ObjectState(OPSER_OSAL);
150  for (int i = 0; i < state->childCount(); i++) {
151  ObjectState* child = state->child(i);
152  operation->addChild(toXMLFormat(child));
153  }
154  return operation;
155 }

References ObjectState::addChild(), ObjectState::child(), ObjectState::childCount(), OPSER_OSAL, OPSER_VERSION, ObjectState::setAttribute(), toXMLFormat(), and VERSION_NUMBER.

Referenced by writeState().

Here is the call graph for this function:

◆ operator=()

OperationSerializer& OperationSerializer::operator= ( const OperationSerializer )
private

Assignment not allowed.

◆ readState()

ObjectState * OperationSerializer::readState ( )
virtual

Reads the Operation property file and returns a corresponding ObjectState.

ObjectState is converted to more easily parseable format before returning.

Returns
The read ObjectState tree.

Implements TCETools::Serializer.

Definition at line 118 of file OperationSerializer.cc.

118  {
119  ObjectState* operationState = NULL;
120  try {
121  ObjectState* xmlState = serializer_.readState();
122  operationState = convertToOperationFormat(xmlState);
123  delete xmlState;
124  } catch (const Exception& e) {
125  string method = "OperationSerializer::readState()";
126  string msg = "Problems reading the state: " + e.errorMessage();
127  SerializerException error(__FILE__, __LINE__, __func__, msg);
128  error.setCause(e);
129  throw error;
130  }
131 
132  return operationState;
133 }

References __func__, convertToOperationFormat(), Exception::errorMessage(), XMLSerializer::readState(), serializer_, and Exception::setCause().

Referenced by OSEdTreeView::constructTree(), OSEdRemoveOperationCmd::Do(), OSEdPropertiesCmd::Do(), OperationPropertyLoader::loadModule(), OperationContainer::operation(), OperationIndex::readOperations(), and OperationBuilder::verifyXML().

Here is the call graph for this function:

◆ setDestinationFile()

void OperationSerializer::setDestinationFile ( const std::string &  filename)

Sets destination file.

Parameters
filenameThe name of the file.

Definition at line 546 of file OperationSerializer.cc.

546  {
548 }

References serializer_, and XMLSerializer::setDestinationFile().

Referenced by OSEdAddModuleCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdPropertiesCmd::Do(), and OSEdAddOperationCmd::Do().

Here is the call graph for this function:

◆ setOperandProperties()

void OperationSerializer::setOperandProperties ( ObjectState operand,
ObjectState source 
)
private

Set operand properties to right values.

Parameters
operandOperand which properties are set.
sourceOriginal ObjectState tree.

Definition at line 508 of file OperationSerializer.cc.

510  {
511 
512  for (int childIndex = 0; childIndex < source->childCount();
513  childIndex++) {
514 
515  ObjectState* child = source->child(childIndex);
516  if (child->name() == Operand::OPRND_MEM_ADDRESS) {
518  } else if (child->name() == Operand::OPRND_MEM_DATA) {
519  operand->setAttribute(Operand::OPRND_MEM_DATA, true);
520  } else if (child->name() == Operand::OPRND_CAN_SWAP) {
521  ObjectState* canSwap = new ObjectState(*child);
522  operand->addChild(canSwap);
523  }
524  if (child->name() == Operand::OPRND_MEM_UNITS) {
526  }
527  }
528 }

References ObjectState::addChild(), ObjectState::child(), ObjectState::childCount(), ObjectState::intValue(), ObjectState::name(), Operand::OPRND_CAN_SWAP, Operand::OPRND_MEM_ADDRESS, Operand::OPRND_MEM_DATA, Operand::OPRND_MEM_UNITS, and ObjectState::setAttribute().

Referenced by toOperation().

Here is the call graph for this function:

◆ setSchemaFile()

void OperationSerializer::setSchemaFile ( const std::string &  filename)

Sets schema file.

Parameters
fileNameThe name of the file.

Definition at line 556 of file OperationSerializer.cc.

556  {
557  serializer_.setSchemaFile(filename);
558 }

References serializer_, and XMLSerializer::setSchemaFile().

Referenced by OperationSerializer().

Here is the call graph for this function:

◆ setSourceFile()

void OperationSerializer::setSourceFile ( const std::string &  filename)

Sets source file.

Parameters
filenameThe name of the file.

Definition at line 536 of file OperationSerializer.cc.

536  {
537  serializer_.setSourceFile(filename);
538 }

References serializer_, and XMLSerializer::setSourceFile().

Referenced by OSEdTreeView::constructTree(), OSEdRemoveOperationCmd::Do(), OSEdPropertiesCmd::Do(), OperationPropertyLoader::loadModule(), OperationContainer::operation(), OperationIndex::readOperations(), and OperationBuilder::verifyXML().

Here is the call graph for this function:

◆ setUseSchema()

void OperationSerializer::setUseSchema ( bool  useSchema)

Sets whether schema is used or not.

Parameters
useSchemaTrue or false, depending on if schema is to be used or not.

Definition at line 566 of file OperationSerializer.cc.

566  {
567  serializer_.setUseSchema(useSchema);
568 }

References serializer_, and XMLSerializer::setUseSchema().

Referenced by OperationSerializer().

Here is the call graph for this function:

◆ toOperation()

ObjectState * OperationSerializer::toOperation ( const ObjectState state)
private

Converts Operation ObjectState tree to more easily parsed format.

Parameters
stateObjectState to be converted.
Exceptions
ObjectStateLoadingExceptionIf ObjectState conversion fails.
Returns
The converted ObjectState tree.

Definition at line 335 of file OperationSerializer.cc.

335  {
337 
338  try {
339  for (int i = 0; i < state->childCount(); i++) {
340 
341  ObjectState* child = state->child(i);
342 
343  if (child->name() == Operation::OPRN_NAME) {
344  root->setAttribute(
346  } else if (child->name() == Operation::OPRN_DESCRIPTION) {
348  } else if (child->name() == Operation::OPRN_INPUTS) {
350  } else if (child->name() == Operation::OPRN_OUTPUTS) {
352  } else if (child->name() == Operation::OPRN_READS_MEMORY) {
354  } else if (child->name() == Operation::OPRN_WRITES_MEMORY) {
356  } else if (child->name() == Operation::OPRN_TRAP) {
357  root->setAttribute(Operation::OPRN_TRAP, true);
358  } else if (child->name() == Operation::OPRN_SIDE_EFFECTS) {
360  } else if (child->name() == Operation::OPRN_CLOCKED) {
362  } else if (child->name() == Operation::OPRN_CONTROL_FLOW) {
364  } else if (child->name() == Operation::OPRN_ISCALL) {
366  } else if (child->name() == Operation::OPRN_ISBRANCH) {
368 
369 // } else if (child->name() == Operation::OPRN_AFFECTED_BY) {
370 // ObjectState* affectedBy = new ObjectState(*child);
371 // root->addChild(affectedBy);
372 
373 // } else if (child->name() == Operation::OPRN_AFFECTS) {
374 // ObjectState* affects = new ObjectState(*child);
375 // root->addChild(affects);
376 
377  } else if (child->name() == Operation::OPRN_IN) {
378  ObjectState* inOperand = new ObjectState(Operation::OPRN_IN);
379 
380  inOperand->setAttribute(
383 
384  inOperand->setAttribute(
387 
389  inOperand->setAttribute(
392  }
393 
395  inOperand->setAttribute(
398  }
399 
400  root->addChild(inOperand);
401 
402  setOperandProperties(inOperand, child);
403 
404  if (!inOperand->hasAttribute(Operand::OPRND_MEM_ADDRESS)) {
405  inOperand->setAttribute(Operand::OPRND_MEM_ADDRESS, false);
406  }
407 
408  if (!inOperand->hasAttribute(Operand::OPRND_MEM_DATA)) {
409  inOperand->setAttribute(Operand::OPRND_MEM_DATA, false);
410  }
411 
412  } else if (child->name() == Operation::OPRN_OUT) {
413 
414  ObjectState* outOperand = new ObjectState(Operation::OPRN_OUT);
415 
416  outOperand->setAttribute(
419 
420  outOperand->setAttribute(
423 
425  outOperand->setAttribute(
428  }
429 
431  outOperand->setAttribute(
434  }
435 
436  root->addChild(outOperand);
437  setOperandProperties(outOperand, child);
438 
439  outOperand->setAttribute(Operand::OPRND_MEM_ADDRESS, false);
440 
441  if (!outOperand->hasAttribute(Operand::OPRND_MEM_DATA)) {
442  outOperand->setAttribute(Operand::OPRND_MEM_DATA, false);
443  }
444 
445  } else {
446  // just copy other elements
447  ObjectState* copyChild = new ObjectState(*child);
448  root->addChild(copyChild);
449  }
450  }
451 
452  root->setAttribute(
455 
457  root->setAttribute(Operation::OPRN_DESCRIPTION, std::string(""));
458  }
459 
462  }
463 
466  }
467 
468  if (!root->hasAttribute(Operation::OPRN_TRAP)) {
469  root->setAttribute(Operation::OPRN_TRAP, false);
470  }
471 
474  }
475 
478  }
479 
482  }
483  if (!root->hasAttribute(Operation::OPRN_ISCALL)) {
484  root->setAttribute(Operation::OPRN_ISCALL, false);
485  }
488  }
489 
490  } catch (const Exception& e) {
491  string msg = "Error while constructing ObjectState tree" +
492  e.errorMessage();
493  ObjectStateLoadingException error(__FILE__, __LINE__, __func__, msg);
494  error.setCause(e);
495  throw error;
496  }
497 
498  return root;
499 }

References __func__, ObjectState::addChild(), ObjectState::child(), ObjectState::childCount(), Exception::errorMessage(), ObjectState::hasAttribute(), ObjectState::intAttribute(), ObjectState::intValue(), ObjectState::name(), Operation::OPRN_CLOCKED, Operation::OPRN_CONTROL_FLOW, Operation::OPRN_DESCRIPTION, Operation::OPRN_IN, Operation::OPRN_INPUTS, Operation::OPRN_ISBRANCH, Operation::OPRN_ISCALL, Operation::OPRN_NAME, Operation::OPRN_OPERATION, Operation::OPRN_OUT, Operation::OPRN_OUTPUTS, Operation::OPRN_READS_MEMORY, Operation::OPRN_SIDE_EFFECTS, Operation::OPRN_TRAP, Operation::OPRN_WRITES_MEMORY, Operand::OPRND_ELEM_COUNT, Operand::OPRND_ELEM_WIDTH, Operand::OPRND_ID, Operand::OPRND_MEM_ADDRESS, Operand::OPRND_MEM_DATA, Operand::OPRND_TYPE, ObjectState::setAttribute(), Exception::setCause(), setOperandProperties(), ObjectState::stringAttribute(), StringTools::stringToUpper(), and ObjectState::stringValue().

Referenced by convertToOperationFormat().

Here is the call graph for this function:

◆ toXMLFormat()

ObjectState * OperationSerializer::toXMLFormat ( const ObjectState state)
private

Converts an individual operation to xml format.

Parameters
stateObjectState to be converted.
Exceptions
ObjectStateLoadingExceptionIf ObjectState conversion fails.
Returns
The converted ObjectState tree.

Definition at line 165 of file OperationSerializer.cc.

165  {
167  try {
168  ObjectState* nameChild = new ObjectState(Operation::OPRN_NAME);
169  nameChild->setValue(state->stringAttribute(Operation::OPRN_NAME));
170  oper->addChild(nameChild);
171 
172  ObjectState* descriptionChild = new ObjectState(Operation::OPRN_DESCRIPTION);
173  descriptionChild->setValue(state->stringAttribute(Operation::OPRN_DESCRIPTION));
174  oper->addChild(descriptionChild);
175 
177  inputChild->setValue(state->intAttribute(Operation::OPRN_INPUTS));
178  oper->addChild(inputChild);
179 
180  ObjectState* outputChild = new ObjectState(Operation::OPRN_OUTPUTS);
181  outputChild->setValue(state->intAttribute(Operation::OPRN_OUTPUTS));
182  oper->addChild(outputChild);
183 
186  }
187 
190  }
191 
192  if (state->boolAttribute(Operation::OPRN_TRAP)) {
194  }
195 
198  }
199 
202  }
203 
206  }
207 
210  }
211 
214  }
215 
216  for (int i = 0; i < state->childCount(); i++) {
217 
218  ObjectState* child = state->child(i);
219  if (child->name() == Operation::OPRN_IN ||
220  child->name() == Operation::OPRN_OUT) {
221 
222  ObjectState* operandChild = NULL;
223  if (child->name() == Operation::OPRN_IN) {
224  operandChild = new ObjectState(Operation::OPRN_IN);
225  } else {
226  operandChild = new ObjectState(Operation::OPRN_OUT);
227  }
228 
229  operandChild->setAttribute(
232 
233  operandChild->setAttribute(
236 
238  operandChild->setAttribute(
241  }
242 
244  operandChild->setAttribute(
247  }
248 
250  operandChild->
252  }
253 
255  operandChild->addChild(
257  }
258 
260  ObjectState* units = new ObjectState(
262  units->setValue(child->intAttribute(
264  operandChild->addChild(units);
265  }
266 
267  // can swap list
268  if (child->childCount() > 0) {
269  ObjectState* swap =
271  ObjectState* canSwap = child->child(0);
272 
273  for (int j = 0; j < canSwap->childCount(); j++) {
274  ObjectState* swapChild = canSwap->child(j);
275 
276  ObjectState* newSwap =
278 
279  newSwap->setAttribute(
281  swapChild->intAttribute(Operand::OPRND_ID));
282  swap->addChild(newSwap);
283 
284  }
285  operandChild->addChild(swap);
286  }
287 
288  oper->addChild(operandChild);
289  } else {
290 
291  ObjectState* newChild = new ObjectState(*child);
292  oper->addChild(newChild);
293  }
294  }
295 
296  } catch (const Exception& e) {
297  string msg = "Error while constructing ObjectState tree: " +
298  e.errorMessage();
299  ObjectStateLoadingException error(__FILE__, __LINE__, __func__, msg);
300  error.setCause(e);
301  throw error;
302  }
303  return oper;
304 }

References __func__, ObjectState::addChild(), ObjectState::boolAttribute(), ObjectState::child(), ObjectState::childCount(), Exception::errorMessage(), ObjectState::hasAttribute(), ObjectState::intAttribute(), ObjectState::name(), Operation::OPRN_CLOCKED, Operation::OPRN_CONTROL_FLOW, Operation::OPRN_DESCRIPTION, Operation::OPRN_IN, Operation::OPRN_INPUTS, Operation::OPRN_ISBRANCH, Operation::OPRN_ISCALL, Operation::OPRN_NAME, Operation::OPRN_OPERATION, Operation::OPRN_OUT, Operation::OPRN_OUTPUTS, Operation::OPRN_READS_MEMORY, Operation::OPRN_SIDE_EFFECTS, Operation::OPRN_TRAP, Operation::OPRN_WRITES_MEMORY, Operand::OPRND_CAN_SWAP, Operand::OPRND_ELEM_COUNT, Operand::OPRND_ELEM_WIDTH, Operand::OPRND_ID, Operand::OPRND_IN, Operand::OPRND_MEM_ADDRESS, Operand::OPRND_MEM_DATA, Operand::OPRND_MEM_UNITS, Operand::OPRND_TYPE, ObjectState::setAttribute(), Exception::setCause(), ObjectState::setValue(), and ObjectState::stringAttribute().

Referenced by convertToXMLFormat().

Here is the call graph for this function:

◆ writeState()

void OperationSerializer::writeState ( const ObjectState state)
virtual

Writes the state of operations to XML file.

The states of operations are first converted to the format understood by XMLSerializer and then written.

Parameters
stateObjectState to be written.
Exceptions
SerializerExceptionIf error occurs.

Implements TCETools::Serializer.

Definition at line 96 of file OperationSerializer.cc.

96  {
97  try {
98  ObjectState* converted = convertToXMLFormat(state);
99  serializer_.writeState(converted);
100  delete converted;
101  } catch (const Exception& e) {
102  string method = "OperationSerializer::writeState()";
103  string msg = "Problems writing the state: " + e.errorMessage();
104  SerializerException error(__FILE__, __LINE__, __func__, msg);
105  error.setCause(e);
106  throw error;
107  }
108 }

References __func__, convertToXMLFormat(), Exception::errorMessage(), serializer_, Exception::setCause(), and XMLSerializer::writeState().

Referenced by OSEdAddModuleCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdPropertiesCmd::Do(), and OSEdAddOperationCmd::Do().

Here is the call graph for this function:

Member Data Documentation

◆ serializer_

XMLSerializer OperationSerializer::serializer_
private

Constructs the ObjectState tree from the XML file.

Definition at line 77 of file OperationSerializer.hh.

Referenced by readState(), setDestinationFile(), setSchemaFile(), setSourceFile(), setUseSchema(), and writeState().


The documentation for this class was generated from the following files:
OPSER_VERSION
const string OPSER_VERSION
XML tag for version.
Definition: OperationSerializer.cc:60
Operand::OPRND_ELEM_COUNT
static const std::string OPRND_ELEM_COUNT
Object state name for element count.
Definition: Operand.hh:100
LIBRARY_NAME
const string LIBRARY_NAME
Name of the library.
Definition: OperationSerializer.cc:52
OperationSerializer::toOperation
ObjectState * toOperation(const ObjectState *state)
Definition: OperationSerializer.cc:335
ObjectState::hasAttribute
bool hasAttribute(const std::string &name) const
Definition: ObjectState.cc:205
Operand::OPRND_MEM_DATA
static const std::string OPRND_MEM_DATA
Object state name for memory data.
Definition: Operand.hh:90
ObjectState::stringAttribute
std::string stringAttribute(const std::string &name) const
Definition: ObjectState.cc:249
OperationSerializer::serializer_
XMLSerializer serializer_
Constructs the ObjectState tree from the XML file.
Definition: OperationSerializer.hh:77
XMLSerializer::setSourceFile
void setSourceFile(const std::string &fileName)
Definition: XMLSerializer.cc:115
Operand::OPRND_MEM_ADDRESS
static const std::string OPRND_MEM_ADDRESS
Object state name for memory address.
Definition: Operand.hh:86
Operand::OPRND_MEM_UNITS
static const std::string OPRND_MEM_UNITS
Object state name for memory unit count.
Definition: Operand.hh:88
ObjectStateLoadingException
Definition: Exception.hh:551
Operation::OPRN_IN
static const char * OPRN_IN
Object state name for input operand.
Definition: Operation.hh:91
ObjectState::intValue
int intValue() const
OperationSerializer::convertToOperationFormat
ObjectState * convertToOperationFormat(const ObjectState *state)
Definition: OperationSerializer.cc:318
OperationSerializer::convertToXMLFormat
ObjectState * convertToXMLFormat(const ObjectState *state)
Definition: OperationSerializer.cc:147
Operation::OPRN_NAME
static const char * OPRN_NAME
Object state name for name.
Definition: Operation.hh:67
Operand::OPRND_CAN_SWAP
static const std::string OPRND_CAN_SWAP
Object state name for can swap.
Definition: Operand.hh:92
VERSION_NUMBER
const double VERSION_NUMBER
The version number.
Definition: OperationSerializer.cc:55
ObjectState
Definition: ObjectState.hh:59
StringTools::stringToUpper
static std::string stringToUpper(const std::string &source)
Definition: StringTools.cc:143
OperationSerializer::setOperandProperties
void setOperandProperties(ObjectState *operand, ObjectState *source)
Definition: OperationSerializer.cc:508
Operation::OPRN_CONTROL_FLOW
static const char * OPRN_CONTROL_FLOW
Object state name for control flow property.
Definition: Operation.hh:81
Operation::OPRN_DESCRIPTION
static const char * OPRN_DESCRIPTION
Object state name for description.
Definition: Operation.hh:69
Operand::OPRND_ID
static const std::string OPRND_ID
Object state name for operand id.
Definition: Operand.hh:82
Operation::OPRN_TRAP
static const char * OPRN_TRAP
Object state name for trap.
Definition: Operation.hh:75
XMLSerializer::setSchemaFile
void setSchemaFile(const std::string &fileName)
Definition: XMLSerializer.cc:168
OPSER_OSAL
const string OPSER_OSAL
XML tag for the module.
Definition: OperationSerializer.cc:58
OperationSerializer::toXMLFormat
ObjectState * toXMLFormat(const ObjectState *state)
Definition: OperationSerializer.cc:165
XMLSerializer::readState
virtual ObjectState * readState()
Definition: XMLSerializer.cc:200
Operation::OPRN_OPERATION
static const char * OPRN_OPERATION
Object state name for operation.
Definition: Operation.hh:65
Operation::OPRN_CLOCKED
static const char * OPRN_CLOCKED
Object state name for clockedness.
Definition: Operation.hh:79
XMLSerializer::setDestinationFile
void setDestinationFile(const std::string &fileName)
Definition: XMLSerializer.cc:142
__func__
#define __func__
Definition: Application.hh:67
Operation::OPRN_ISCALL
static const char * OPRN_ISCALL
Object state name for call property.
Definition: Operation.hh:97
TCETools::Serializer
Definition: Serializer.hh:45
Environment::schemaDirPath
static std::string schemaDirPath(const std::string &prog)
Definition: Environment.cc:151
ObjectState::child
ObjectState * child(int index) const
Definition: ObjectState.cc:471
ObjectState::addChild
void addChild(ObjectState *child)
Definition: ObjectState.cc:376
Operation::OPRN_WRITES_MEMORY
static const char * OPRN_WRITES_MEMORY
Object state name for writes memory.
Definition: Operation.hh:85
ObjectState::childCount
int childCount() const
OperationSerializer::setSchemaFile
void setSchemaFile(const std::string &filename)
Definition: OperationSerializer.cc:556
OperationSerializer::setUseSchema
void setUseSchema(bool useSchema)
Definition: OperationSerializer.cc:566
SerializerException
Definition: Exception.hh:675
Operation::OPRN_READS_MEMORY
static const char * OPRN_READS_MEMORY
Object state name for reads memory.
Definition: Operation.hh:83
Exception
Definition: Exception.hh:54
Operand::OPRND_IN
static const std::string OPRND_IN
Object state name for input operand.
Definition: Operand.hh:94
ObjectState::name
std::string name() const
XMLSerializer::setUseSchema
void setUseSchema(bool useSchema)
Definition: XMLSerializer.cc:179
Operation::OPRN_OUT
static const char * OPRN_OUT
Object state name for output operand.
Definition: Operation.hh:93
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
Operation::OPRN_INPUTS
static const char * OPRN_INPUTS
Object state name for inputs.
Definition: Operation.hh:71
FileSystem::DIRECTORY_SEPARATOR
static const std::string DIRECTORY_SEPARATOR
Definition: FileSystem.hh:189
Operand::OPRND_TYPE
static const std::string OPRND_TYPE
Object state name for operand type.
Definition: Operand.hh:84
Operation::OPRN_SIDE_EFFECTS
static const char * OPRN_SIDE_EFFECTS
Object state name for side effects.
Definition: Operation.hh:77
Operand::OPRND_ELEM_WIDTH
static const std::string OPRND_ELEM_WIDTH
Object state name for element width.
Definition: Operand.hh:98
FileSystem::fileExists
static bool fileExists(const std::string fileName)
ObjectState::boolAttribute
bool boolAttribute(const std::string &name) const
Definition: ObjectState.cc:338
SCHEMA_FILE_NAME
const string SCHEMA_FILE_NAME
Schema file name.
Definition: OperationSerializer.cc:50
ObjectState::stringValue
std::string stringValue() const
ObjectState::intAttribute
int intAttribute(const std::string &name) const
Definition: ObjectState.cc:276
ObjectState::setValue
void setValue(const std::string &value)
Operation::OPRN_ISBRANCH
static const char * OPRN_ISBRANCH
Object state name for branch property.
Definition: Operation.hh:99
Operation::OPRN_OUTPUTS
static const char * OPRN_OUTPUTS
Object state name for outputs.
Definition: Operation.hh:73
ObjectState::setAttribute
void setAttribute(const std::string &name, const std::string &value)
Definition: ObjectState.cc:100
XMLSerializer::writeState
virtual void writeState(const ObjectState *rootState)
Definition: XMLSerializer.cc:219