MeshLink
Computational geometry access
|
A MeshLink data parser using Apache Xerces XML library. More...
#include <MeshLinkParser_xerces.h>
Public Member Functions | |
MeshLinkParserXerces () | |
Default constructor. More... | |
~MeshLinkParserXerces () | |
Destructor. More... | |
bool | validate (const std::string &fileName, const std::string &schemaName) override |
Validate XML file against MeshLink schema using the Xerces parser. More... | |
bool | parseMeshLinkFile (std::string fname, MeshAssociativity *meshAssociativity) override |
Parse a MeshLink XML file and populate a MeshAssociativity using the Xerces XML parser. More... | |
bool | getMeshLinkAttributes (std::string &xmlns, std::string &xmlns_xsi, std::string &schemaLocation) override |
Obtain the MeshLink XML file properties after reading. More... | |
MeshLinkWriterXerces * | getXMLWriter () |
Return a new MeshLinkWriter object using the Xerces API. More... | |
void | setVerboseLevel (int level) |
Set the verbosity of the parser message output. More... | |
Public Member Functions inherited from MeshLinkParser | |
MeshLinkParser () | |
Default constructor. More... | |
~MeshLinkParser () | |
Destructor. More... | |
Private Member Functions | |
bool | parseAttributes (xercesc_3_2::DOMElement *root) |
Populate the MeshLinkAttribute objects. More... | |
bool | parsePeriodicInfo (xercesc_3_2::DOMElement *root) |
Populate the Transform and MeshElementLinkage objects. More... | |
bool | parseGeometryRefs (xercesc_3_2::DOMElement *root) |
Populate the GeometryGroup objects. More... | |
bool | parseMeshFile (xercesc_3_2::DOMElement *element) |
Read the MeshLink XML into a Xerces DOM model. More... | |
bool | parseMeshRefModel (MeshFile &meshFile, xercesc_3_2::DOMElement *modelRef) |
Create a MeshModel from the Xerces DOM model. More... | |
bool | parseMeshSheet (MeshModel *model, xercesc_3_2::DOMElement *meshSheetNode) |
Create a MeshSheet in the given model from the Xerces DOM model. More... | |
bool | parseMeshSheetReference (MeshModel *model, xercesc_3_2::DOMElement *meshSheetNode) |
Create a MeshSheet from reference data in the given model from the Xerces DOM model. More... | |
bool | parseMeshString (MeshModel *model, xercesc_3_2::DOMElement *meshStringNode) |
Create a MeshString from reference data in the given model from the Xerces DOM model. More... | |
bool | parseMeshStringReference (MeshModel *model, xercesc_3_2::DOMElement *meshStringNode) |
Create a MeshString from reference data in the given model from the Xerces DOM model. More... | |
bool | parseParamVertex (MeshTopo *meshTopo, xercesc_3_2::DOMElement *element) |
Create a ParamVertex for the given MeshTopo entity from the Xerces DOM model. More... | |
bool | parseMeshPoint (MeshModel *model, xercesc_3_2::DOMElement *meshPoint) |
Create a MeshPoint in the given model from the Xerces DOM model. More... | |
bool | parseMeshPointReference (MeshModel *model, xercesc_3_2::DOMElement *meshPoint) |
Create a MeshPoint from reference data in the given model from the Xerces DOM model. More... | |
bool | parseMeshPointReference (MeshModel *model, MeshTopo *parentMeshTopo, xercesc_3_2::DOMElement *meshPoint) |
Create a MeshPoint from reference data in the given model and parent MeshTopo entity from the Xerces DOM model. More... | |
bool | parseMeshEdge (MeshModel *model, MeshTopo *meshTopo, xercesc_3_2::DOMElement *element) |
Create a MeshEdge in the given model and parent MeshTopo entity from the Xerces DOM model. More... | |
bool | parseMeshEdgeReference (MeshModel *model, MeshTopo *meshTopo, xercesc_3_2::DOMElement *element) |
Create a MeshEdge from reference data in the given model and parent MeshTopo entity from the Xerces DOM model. More... | |
bool | parseMeshFace (MeshModel *model, MeshTopo *meshTopo, xercesc_3_2::DOMElement *element) |
Create a MeshFace in the given model and parent MeshTopo entity from the Xerces DOM model. More... | |
bool | parseMeshFaceReference (MeshModel *model, MeshTopo *meshTopo, xercesc_3_2::DOMElement *element) |
Create a MeshFace from reference data in the given model and parent MeshTopo entity from the Xerces DOM model. More... | |
bool | parseMeshObject (MeshModel *model, MeshTopo *meshTopo, xercesc_3_2::DOMElement *xmlObj, const char *objName, ParseMeshObjMap &parseMeshObjMap, bool &mapID) |
Create MeshTopo object in the given MeshModel from the Xerces DOM model. The type of object to create is determined from the object name and lookup map. More... | |
Private Attributes | |
MeshAssociativity * | meshAssociativity_ |
the MeshAssociativity object to be populated More... | |
int | verbose_level_ |
std::string | xmlVersion_ |
The XML version string read from the input file. More... | |
std::string | xmlns_ |
The XML Namespace string read from the input file. More... | |
std::string | xmlns_xsi_ |
The XML XSI Namespace string read from the input file. More... | |
std::string | schemaLocation_ |
The XSD file name read from the input file. More... | |
A MeshLink data parser using Apache Xerces XML library.
This is a reference implementation of the MeshLinkParser API.
Definition at line 60 of file MeshLinkParser_xerces.h.
|
inline |
Default constructor.
Definition at line 63 of file MeshLinkParser_xerces.h.
MeshLinkParserXerces::~MeshLinkParserXerces | ( | ) |
Destructor.
|
inlineoverridevirtual |
Obtain the MeshLink XML file properties after reading.
[out] | xmlns | the XML namespace string |
[out] | xmlns_xsi | the XML Schema Instance (XSI) namespace string |
[out] | schemaLocation | the file name (path) of the XML Schema Definition (XSD) file |
Reimplemented from MeshLinkParser.
Definition at line 94 of file MeshLinkParser_xerces.h.
MeshLinkWriterXerces* MeshLinkParserXerces::getXMLWriter | ( | ) |
Return a new MeshLinkWriter object using the Xerces API.
It is the responsibility of the caller to delete the returned object.
|
private |
Populate the MeshLinkAttribute objects.
|
private |
Populate the GeometryGroup objects.
|
private |
Read the MeshLink XML into a Xerces DOM model.
|
overridevirtual |
Parse a MeshLink XML file and populate a MeshAssociativity using the Xerces XML parser.
fname | the MeshLink XML file name |
meshAssociativity | the MeshAssociativity object to populate |
Reimplemented from MeshLinkParser.
|
private |
|
private |
Create a MeshPoint in the given model from the Xerces DOM model.
|
private |
Create a MeshPoint from reference data in the given model from the Xerces DOM model.
|
private |
Create a MeshModel from the Xerces DOM model.
|
private |
Create a MeshSheet in the given model from the Xerces DOM model.
|
private |
Create a MeshSheet from reference data in the given model from the Xerces DOM model.
|
private |
Create a MeshString from reference data in the given model from the Xerces DOM model.
|
private |
Create a MeshString from reference data in the given model from the Xerces DOM model.
|
private |
Create a ParamVertex for the given MeshTopo entity from the Xerces DOM model.
|
private |
Populate the Transform and MeshElementLinkage objects.
|
inline |
Set the verbosity of the parser message output.
Larger values result in more output. 0 = errors only.
Definition at line 114 of file MeshLinkParser_xerces.h.
|
overridevirtual |
Validate XML file against MeshLink schema using the Xerces parser.
fileName | the MeshLink XML file name |
schemaName | the MeshLink XML Schema Definition (XSD) file name |
Reimplemented from MeshLinkParser.
|
private |
the MeshAssociativity object to be populated
Definition at line 178 of file MeshLinkParser_xerces.h.
|
private |
The XSD file name read from the input file.
Definition at line 193 of file MeshLinkParser_xerces.h.
|
private |
Definition at line 180 of file MeshLinkParser_xerces.h.
|
private |
The XML Namespace string read from the input file.
Definition at line 189 of file MeshLinkParser_xerces.h.
|
private |
The XML XSI Namespace string read from the input file.
Definition at line 191 of file MeshLinkParser_xerces.h.
|
private |
The XML version string read from the input file.
Definition at line 187 of file MeshLinkParser_xerces.h.