void parseStepElementNode(xmlNodePtr eltNode, Step* step);
std::string readStringProp(xmlNodePtr node, const xmlChar* attribute,
- const bool& required, const std::string& defaultValue,
+ bool required, const std::string& defaultValue,
const std::string& exception = std::string(""));
int readIntegerProp(xmlNodePtr node, const xmlChar* attribute,
- const bool& required, const int& defaultValue,
+ bool required, int defaultValue,
const std::string& exception = std::string(""));
std::string readStringProp(xmlNodePtr node, const xmlChar* attribute,
- const bool& required, const std::string& defaultValue,
+ bool required, const std::string& defaultValue,
const std::string& exception /*= std::string() */)
{
xmlChar* strAttr = xmlGetProp(node, attribute);
}
int readIntegerProp(xmlNodePtr node, const xmlChar* attribute,
- const bool& required, const int& defaultValue,
+ bool required, int defaultValue,
const std::string& exception /*= std::string() */)
{
xmlChar* strAttr = xmlGetProp(node, attribute);
{
// export the shape in the XAO file
std::string txtShape = xaoGeometry->getShapeString();
- xmlNodePtr cdata = xmlNewCDataBlock(doc, BAD_CAST txtShape.c_str(), (int)txtShape.size());
+ xmlNodePtr cdata = xmlNewCDataBlock(doc, BAD_CAST txtShape.c_str(), txtShape.size());
xmlAddChild(shape, cdata);
}
else
}
}
-const bool XaoExporter::saveToFile(Xao* xaoObject, const std::string& fileName, const std::string& shapeFileName)
-throw (XAO_Exception)
+bool XaoExporter::saveToFile(Xao* xaoObject, const std::string& fileName, const std::string& shapeFileName)
+
{
xmlDocPtr doc = exportXMLDoc(xaoObject, shapeFileName);
xmlSaveFormatFileEnc(fileName.c_str(), doc, "UTF-8", 1); // format = 1 for node indentation
}
const std::string XaoExporter::saveToXml(Xao* xaoObject)
-throw (XAO_Exception)
+
{
xmlDocPtr doc = exportXMLDoc(xaoObject, "");
return (char*)xmlbuff;
}
-const bool XaoExporter::readFromFile(const std::string& fileName, Xao* xaoObject)
-throw (XAO_Exception)
+bool XaoExporter::readFromFile(const std::string& fileName, Xao* xaoObject)
+
{
// parse the file and get the DOM
int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA;
return true;
}
-const bool XaoExporter::setXML(const std::string& xml, Xao* xaoObject)
-throw (XAO_Exception)
+bool XaoExporter::setXML(const std::string& xml, Xao* xaoObject)
+
{
int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA;
xmlDocPtr doc = xmlReadDoc(BAD_CAST xml.c_str(), "", NULL, options);