Version: 9.12.0
XAOPlugin_IOperations Class Reference

#include <XAOPlugin_IOperations.hxx>

Inheritance diagram for XAOPlugin_IOperations:
Inheritance graph

Public Member Functions

 XAOPlugin_IOperations (GEOM_Engine *)
 
 ~XAOPlugin_IOperations ()
 
bool ExportXAO (Handle(GEOM_Object) shape, std::list< Handle(GEOM_Object)> groupList, std::list< Handle(GEOM_Field)> fieldList, const char *author, const char *fileName, const char *shapeFileName)
 
std::string ExportXAOMem (Handle(GEOM_Object) shape, std::list< Handle(GEOM_Object)> groupList, std::list< Handle(GEOM_Field)> fieldList, const char *author)
 
bool ImportXAO (const char *fileName, Handle(GEOM_Object)&shape, Handle(TColStd_HSequenceOfTransient)&subShapes, Handle(TColStd_HSequenceOfTransient)&groups, Handle(TColStd_HSequenceOfTransient)&fields)
 
bool ImportXAOMem (const std::string &theXML, Handle(GEOM_Object)&shape, Handle(TColStd_HSequenceOfTransient)&subShapes, Handle(TColStd_HSequenceOfTransient)&groups, Handle(TColStd_HSequenceOfTransient)&fields)
 
- Public Member Functions inherited from GEOMImpl_IBaseIEOperations
Standard_EXPORT GEOMImpl_IBaseIEOperations (GEOM_Engine *theEngine)
 
Standard_EXPORT ~GEOMImpl_IBaseIEOperations ()
 
- Public Member Functions inherited from GEOM_IOperations
Standard_EXPORT GEOM_IOperations (GEOM_Engine *theEngine)
 
Standard_EXPORT ~GEOM_IOperations ()
 
Standard_EXPORT void StartOperation ()
 
Standard_EXPORT void FinishOperation ()
 
Standard_EXPORT void AbortOperation ()
 
Standard_EXPORT bool IsDone ()
 
Standard_EXPORT void SetNotDone ()
 
Standard_EXPORT void SetErrorCode (const TCollection_AsciiString &theErrorCode)
 
Standard_EXPORT char * GetErrorCode ()
 
Standard_EXPORT GEOM_EngineGetEngine ()
 
Standard_EXPORT GEOM_SolverGetSolver ()
 

Private Member Functions

std::string exportXAO (Handle(GEOM_Object) shape, std::list< Handle(GEOM_Object)> groupList, std::list< Handle(GEOM_Field)> fieldList, const char *author, const char *fileName, const char *shapeFileName)
 
bool importXAO (const char *fileName, const std::string &theXML, Handle(GEOM_Object)&shape, Handle(TColStd_HSequenceOfTransient)&subShapes, Handle(TColStd_HSequenceOfTransient)&groups, Handle(TColStd_HSequenceOfTransient)&fields)
 
void importSubShapes (XAO::Geometry *xaoGeometry, Handle(GEOM_Function) function, int shapeType, int dim, Handle(TColStd_HSequenceOfTransient)&subshapeList)
 
void exportSubshapes (const Handle(GEOM_Object)&shape, XAO::BrepGeometry *geometry)
 
void exportFields (std::list< Handle(GEOM_Field)> fieldList, XAO::Xao *xaoObject, XAO::BrepGeometry *geometry)
 
bool exportGroups (std::list< Handle(GEOM_Object)> groupList, XAO::Xao *xaoObject, XAO::BrepGeometry *geometry)
 

Additional Inherited Members

- Protected Member Functions inherited from GEOMImpl_IBaseIEOperations
Standard_EXPORT void MakeMaterialGroups (const Handle(GEOM_Object) &theObject, const Handle(TColStd_HSequenceOfTransient) &theSeq)
 
 Handle (GEOM_Object) MakeGroup(const Handle(GEOM_Object) &theObject
 
- Protected Attributes inherited from GEOMImpl_IBaseIEOperations
const TCollection_ExtendedString & theName
 
const TCollection_ExtendedString const NCollection_List< TopoDS_Shape > & theShapes
 
GEOMImpl_IGroupOperationsmyGroupOperations
 
GEOMImpl_IFieldOperationsmyFieldOperations
 
GEOMImpl_IShapesOperationsmyShapesOperations
 

Constructor & Destructor Documentation

◆ XAOPlugin_IOperations()

XAOPlugin_IOperations::XAOPlugin_IOperations ( GEOM_Engine theEngine)

Constructor

◆ ~XAOPlugin_IOperations()

XAOPlugin_IOperations::~XAOPlugin_IOperations ( )

Destructor

Member Function Documentation

◆ exportFields()

◆ exportGroups()

◆ exportSubshapes()

◆ ExportXAO()

bool XAOPlugin_IOperations::ExportXAO ( Handle(GEOM_Object)  shape,
std::list< Handle(GEOM_Object)>  groupList,
std::list< Handle(GEOM_Field)>  fieldList,
const char *  author,
const char *  fileName,
const char *  shapeFileName 
)

Export a shape to XAO format file.

Parameters
shapeThe shape to export.
groupsThe list of groups to export.
fieldsThe list of fields to export.
fileNameThe name of the file to be exported.
shapeFileNameThe name of the file for shape, if it should be exported separately.
Returns
boolean indicating if export was successful.

References exportXAO(), GEOM_IOperations::IsDone(), and GEOM_IOperations::SetErrorCode().

◆ exportXAO()

std::string XAOPlugin_IOperations::exportXAO ( Handle(GEOM_Object)  shape,
std::list< Handle(GEOM_Object)>  groupList,
std::list< Handle(GEOM_Field)>  fieldList,
const char *  author,
const char *  fileName,
const char *  shapeFileName 
)
private

Export a shape to XAO format file or string.

Parameters
shapeThe shape to export.
groupsThe list of groups to export.
fieldsThe list of fields to export.
fileNameThe name of the file to be exported. If empty, export to string.
shapeFileNameThe name of the file for shape, if it should be exported separately.
Returns
The exported string, if fileName is empty, or empty string.

References XAO::BREP, XAO::Geometry::createGeometry(), EXPORT_SHAPE, exportFields(), exportGroups(), exportSubshapes(), XAO::Xao::exportXAO(), GEOM_IMPORT, GEOM_IOperations::GetEngine(), XAO::Xao::getXML(), GEOMImpl_IBaseIEOperations::Handle(), KO, OK, XAO::Xao::setAuthor(), GEOM_IOperations::SetErrorCode(), XAO::Xao::setGeometry(), XAO::Geometry::setName(), and XAO::BrepGeometry::setTopoDS_Shape().

◆ ExportXAOMem()

std::string XAOPlugin_IOperations::ExportXAOMem ( Handle(GEOM_Object)  shape,
std::list< Handle(GEOM_Object)>  groupList,
std::list< Handle(GEOM_Field)>  fieldList,
const char *  author 
)

Export a shape to XAO format string.

Parameters
shapeThe shape to export.
groupsThe list of groups to export.
fieldsThe list of fields to export.
Returns
The exported string.

References exportXAO().

◆ importSubShapes()

◆ importXAO()

bool XAOPlugin_IOperations::importXAO ( const char *  fileName,
const std::string &  theXML,
Handle(GEOM_Object)&  shape,
Handle(TColStd_HSequenceOfTransient)&  subShapes,
Handle(TColStd_HSequenceOfTransient)&  groups,
Handle(TColStd_HSequenceOfTransient)&  fields 
)
private

Import a shape from XAO format file.

Parameters
fileNameThe name of the file to import.
shapeThe imported shape.
subShapesThe list of imported sub-shapes.
groupsThe list of imported groups.
fieldsThe list of imported fields.
Returns
boolean indicating if import was successful.

References XAO::Group::begin(), XAO::BOOLEAN, XAO::BREP, XAO::Group::count(), XAO::Field::countComponents(), XAO::Xao::countFields(), XAO::Xao::countGroups(), XAO::Field::countSteps(), XAO::Step::countValues(), XAO::DOUBLE, XAO::EDGE, XAO::Group::end(), XAO::FACE, GEOM_EDGE, GEOM_FACE, GEOM_GROUP, GEOM_IMPORT, GEOM_POINT, GEOM_SOLID, XAO::Field::getComponentName(), XAO::Group::getDimension(), XAO::Field::getDimension(), XAO::Geometry::getElementReference(), GEOM_IOperations::GetEngine(), XAO::Xao::getField(), XAO::Geometry::getFormat(), XAO::Xao::getGeometry(), XAO::Xao::getGroup(), getGroupDimension(), XAO::Geometry::getName(), XAO::Group::getName(), XAO::Field::getName(), XAO::Step::getStamp(), XAO::Step::getStep(), XAO::BooleanField::getStep(), XAO::DoubleField::getStep(), XAO::IntegerField::getStep(), XAO::StringField::getStep(), XAO::BrepGeometry::getTopoDS_Shape(), XAO::Field::getType(), XAO::BooleanStep::getValues(), XAO::DoubleStep::getValues(), XAO::IntegerStep::getValues(), XAO::StringStep::getValues(), GEOMImpl_IBaseIEOperations::Handle(), IMPORT_SHAPE, importSubShapes(), XAO::Xao::importXAO(), XAO::INTEGER, KO, GEOMImpl_IBaseIEOperations::myFieldOperations, OK, GEOM_IOperations::SetErrorCode(), XAO::Xao::setXML(), XAO::SOLID, XAO::STRING, XAO::XaoUtils::stringToInt(), XAO::VERTEX, and XAO::XAO_Exception::what().

◆ ImportXAO()

bool XAOPlugin_IOperations::ImportXAO ( const char *  fileName,
Handle(GEOM_Object)&  shape,
Handle(TColStd_HSequenceOfTransient)&  subShapes,
Handle(TColStd_HSequenceOfTransient)&  groups,
Handle(TColStd_HSequenceOfTransient)&  fields 
)

Import a shape from XAO format file.

Parameters
fileNameThe name of the file to import.
shapeThe imported shape.
subShapesThe list of imported sub-shapes.
groupsThe list of imported groups.
fieldsThe list of imported fields.
Returns
boolean indicating if import was successful.

References importXAO(), GEOM_IOperations::IsDone(), and GEOM_IOperations::SetErrorCode().

◆ ImportXAOMem()

bool XAOPlugin_IOperations::ImportXAOMem ( const std::string &  theXML,
Handle(GEOM_Object)&  shape,
Handle(TColStd_HSequenceOfTransient)&  subShapes,
Handle(TColStd_HSequenceOfTransient)&  groups,
Handle(TColStd_HSequenceOfTransient)&  fields 
)

Import a shape from XAO format string.

Parameters
theXMLThe input buffer.
shapeThe imported shape.
subShapesThe list of imported sub-shapes.
groupsThe list of imported groups.
fieldsThe list of imported fields.
Returns
boolean indicating if import was successful.

References importXAO(), and GEOM_IOperations::IsDone().


The documentation for this class was generated from the following files: