SHAPER  9.12.0
XAO::XaoExporter Class Reference

Util class for import/export XAO. More...

Static Public Member Functions

static bool saveToFile (Xao *xaoObject, const std::string &fileName, const std::string &shapeFileName)
 Saves the XAO object to a file. More...
 
static const std::string saveToXml (Xao *xaoObject)
 Saves the XAO object to a XML string. More...
 
static bool readFromFile (const std::string &fileName, Xao *xaoObject)
 Reads a XAO object from a file. More...
 
static bool setXML (const std::string &xml, Xao *xaoObject)
 Reads a XAO object from an XML string. More...
 

Detailed Description

Util class for import/export XAO.

Member Function Documentation

◆ saveToFile()

bool XaoExporter::saveToFile ( Xao xaoObject,
const std::string &  fileName,
const std::string &  shapeFileName 
)
static

Saves the XAO object to a file.

Parameters
xaoObjectthe object to export.
fileNamethe path of the file to create.
shapeFileNameif not empty save the shape in an this external file.
Returns
true if the export was successful, false otherwise.

◆ saveToXml()

const std::string XaoExporter::saveToXml ( Xao xaoObject)
static

Saves the XAO object to a XML string.

Parameters
xaoObjectthe object to export.
Returns
the XML string.

◆ readFromFile()

bool XaoExporter::readFromFile ( const std::string &  fileName,
Xao xaoObject 
)
static

Reads a XAO object from a file.

Parameters
fileNamethe path of the file to read.
xaoObjectthe XAO object.
Returns
true if the XAO object was read successful, false otherwise.

◆ setXML()

bool XaoExporter::setXML ( const std::string &  xml,
Xao xaoObject 
)
static

Reads a XAO object from an XML string.

Parameters
xmlthe XML string.
xaoObjectthe XAO object.
Returns
true if the XAO object was read successful, false otherwise.