X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXAOPlugin%2FXAOPlugin_IOperations.hxx;h=a3ca017f9cb5f6679fd78dc829de32a2a96f3983;hb=3bfb88115e12b64d01e3e5606e4b84184deaceb2;hp=34e17b2c5578a384673dc193d9c971ee8f1d69fe;hpb=852ccfccc50fb56a385fdc8227c985c1417bf053;p=modules%2Fgeom.git diff --git a/src/XAOPlugin/XAOPlugin_IOperations.hxx b/src/XAOPlugin/XAOPlugin_IOperations.hxx index 34e17b2c5..a3ca017f9 100644 --- a/src/XAOPlugin/XAOPlugin_IOperations.hxx +++ b/src/XAOPlugin/XAOPlugin_IOperations.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2014-2024 CEA, EDF, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -40,35 +40,59 @@ namespace XAO { class XAOPLUGINENGINE_EXPORT XAOPlugin_IOperations: public GEOMImpl_IBaseIEOperations { public: - XAOPlugin_IOperations( GEOM_Engine*, int ); + XAOPlugin_IOperations( GEOM_Engine* ); ~XAOPlugin_IOperations(); bool ExportXAO( Handle(GEOM_Object) shape, - std::list groupList, - std::list fieldList, - const char* author, - const char* fileName ); - + std::list groupList, + std::list fieldList, + const char* author, + const char* fileName, + const char* shapeFileName ); + + std::string ExportXAOMem( Handle(GEOM_Object) shape, + std::list groupList, + std::list 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 ); + 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 ); private: - 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 fieldList, - XAO::Xao* xaoObject, - XAO::BrepGeometry* geometry ); - void exportGroups( std::list groupList, - XAO::Xao* xaoObject, - XAO::BrepGeometry* geometry ); + std::string exportXAO( Handle(GEOM_Object) shape, + std::list groupList, + std::list 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 fieldList, + XAO::Xao* xaoObject, + XAO::BrepGeometry* geometry ); + bool exportGroups( std::list groupList, + XAO::Xao* xaoObject, + XAO::BrepGeometry* geometry ); }; #endif