1 // SMESH SMESHDS : management of mesh data and SMESH document
3 // Copyright (C) 2003 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.
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHDS_Command.hxx
27 #ifndef _SMESHDS_Command_HeaderFile
28 #define _SMESHDS_Command_HeaderFile
30 #ifndef _Standard_HeaderFile
31 #include <Standard.hxx>
33 #ifndef _Handle_SMESHDS_Command_HeaderFile
34 #include "Handle_SMESHDS_Command.hxx"
37 #ifndef _SMESHDS_CommandType_HeaderFile
38 #include "SMESHDS_CommandType.hxx"
40 #ifndef _Standard_Integer_HeaderFile
41 #include <Standard_Integer.hxx>
43 #ifndef _TColStd_ListOfReal_HeaderFile
44 #include <TColStd_ListOfReal.hxx>
46 #ifndef _TColStd_ListOfInteger_HeaderFile
47 #include <TColStd_ListOfInteger.hxx>
49 #ifndef _MMgt_TShared_HeaderFile
50 #include <MMgt_TShared.hxx>
52 #ifndef _Standard_Real_HeaderFile
53 #include <Standard_Real.hxx>
55 class TColStd_ListOfInteger;
56 class TColStd_ListOfReal;
59 class SMESHDS_Command : public MMgt_TShared {
63 inline void* operator new(size_t,void* anAddress)
67 inline void* operator new(size_t size)
69 return Standard::Allocate(size);
71 inline void operator delete(void *anAddress)
73 if (anAddress) Standard::Free((Standard_Address&)anAddress);
75 // inline void operator delete(void *anAddress, size_t size)
77 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
81 Standard_EXPORT SMESHDS_Command(const SMESHDS_CommandType aType);
82 Standard_EXPORT void AddNode(const Standard_Integer NewNodeID,const Standard_Real x,const Standard_Real y,const Standard_Real z) ;
83 Standard_EXPORT void AddEdge(const Standard_Integer NewEdgeID,const Standard_Integer idnode1,const Standard_Integer idnode2) ;
84 Standard_EXPORT void AddFace(const Standard_Integer NewFaceID,const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3) ;
85 Standard_EXPORT void AddFace(const Standard_Integer NewFaceID,const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4) ;
86 Standard_EXPORT void AddVolume(const Standard_Integer NewVolID,const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4) ;
87 Standard_EXPORT void AddVolume(const Standard_Integer NewVolID,const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4,const Standard_Integer idnode5) ;
88 Standard_EXPORT void AddVolume(const Standard_Integer NewVolID,const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4,const Standard_Integer idnode5,const Standard_Integer idnode6) ;
89 Standard_EXPORT void AddVolume(const Standard_Integer NewVolID,const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4,const Standard_Integer idnode5,const Standard_Integer idnode6,const Standard_Integer idnode7,const Standard_Integer idnode8) ;
90 Standard_EXPORT void MoveNode(const Standard_Integer NewNodeID,const Standard_Real x,const Standard_Real y,const Standard_Real z) ;
91 Standard_EXPORT void RemoveNode(const Standard_Integer NodeID) ;
92 Standard_EXPORT void RemoveElement(const Standard_Integer ElementID) ;
93 Standard_EXPORT SMESHDS_CommandType GetType() ;
94 Standard_EXPORT Standard_Integer GetNumber() ;
95 Standard_EXPORT const TColStd_ListOfInteger& GetIndexes() ;
96 Standard_EXPORT const TColStd_ListOfReal& GetCoords() ;
97 Standard_EXPORT ~SMESHDS_Command();
104 Standard_EXPORT friend Handle_Standard_Type& SMESHDS_Command_Type_();
105 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
106 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
126 SMESHDS_CommandType myType;
127 Standard_Integer myNumber;
128 TColStd_ListOfReal myReals;
129 TColStd_ListOfInteger myIntegers;
138 // other inline functions and methods (like "C++: function call" methods)