1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef StudyData_Object_H
25 #include "StudyData.h"
26 #include <XAO_Xao.hxx>
35 TopoDS_Shape* myShape; ///< the shape, part of XAO
36 XAO::Xao* myExport; ///< the XAO instance for export
37 XAO::Xao* myImport; ///< the XAO instance for export
38 std::map<int, XAO::Group*> myGroups; ///< id of group to the group structure
41 StudyData_EXPORT StudyData_XAO();
43 // defines the shape for XAO export
44 StudyData_EXPORT void SetShape(const long long theShapePtr);
46 // add a new group for export to XAO; returns id of this group
47 StudyData_EXPORT int AddGroup(const int theSelType, const std::string theGroupName);
48 // sets the selection for an already added group
49 StudyData_EXPORT void AddGroupSelection(const int theGroupID, const int theSelection);
51 // performs the export to XAO
52 StudyData_EXPORT void Export(const std::string theFileName);
54 // Imports the XAO data, returns the error string or empty one if it is ok.
55 StudyData_EXPORT std::string Import(const std::string theFileName);
57 // Returns a pointer to the shape from XAO after import
58 StudyData_EXPORT long long GetShape();
60 // Returns a selection type of the group
61 StudyData_EXPORT int GetGroupDimension(const int theGroupID);
63 // Returns a selection list of indices of the group
64 StudyData_EXPORT std::list<long> GetGroupSelection(const int theGroupID);
67 #endif // !StudyData_XAO_H