]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMClient/GEOM_Client.hxx
Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMClient / GEOM_Client.hxx
1 //  File      : GEOM_Client.hxx
2 //  Created   : 
3 //  Author    : Yves FRICAUD
4 //  Project   : SALOME
5 //  Module    : GEOM
6 //  Copyright : Open CASCADE
7 //  $Header$
8
9 #ifndef _GEOM_Client_HeaderFile
10 #define _GEOM_Client_HeaderFile
11
12 #include <SALOMEconfig.h>
13 #include CORBA_SERVER_HEADER(GEOM_Shape)
14 #include CORBA_SERVER_HEADER(GEOM_Gen)
15 #
16 #ifndef _TColStd_SequenceOfAsciiString_HeaderFile
17 #include <TColStd_SequenceOfAsciiString.hxx>
18 #endif
19 #ifndef _TopTools_SequenceOfShape_HeaderFile
20 #include <TopTools_SequenceOfShape.hxx>
21 #endif
22 #ifndef _Standard_Integer_HeaderFile
23 #include <Standard_Integer.hxx>
24 #endif
25 class TCollection_AsciiString;
26 class TopoDS_Shape;
27
28
29 #ifndef _Standard_HeaderFile
30 #include <Standard.hxx>
31 #endif
32 #ifndef _Standard_Macro_HeaderFile
33 #include <Standard_Macro.hxx>
34 #endif
35
36 //=====================================================================
37 // GEOM_Client : class definition
38 //=====================================================================
39 class GEOM_Client  {
40
41 public:
42   
43   inline void* operator new(size_t,void* anAddress) 
44   {
45     return anAddress;
46   }
47   inline void* operator new(size_t size) 
48   { 
49     return Standard::Allocate(size); 
50   }
51   inline void  operator delete(void *anAddress) 
52   { 
53     if (anAddress) Standard::Free((Standard_Address&)anAddress); 
54   }
55   // Methods PUBLIC
56   // 
57   Standard_EXPORT   GEOM_Client();
58   Standard_EXPORT   Standard_Integer Find( const TCollection_AsciiString& ShapeIOR, TopoDS_Shape& S ) ;
59   Standard_EXPORT   void Bind( const TCollection_AsciiString& ShapeIOR, const TopoDS_Shape& S ) ;
60   Standard_EXPORT   TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape );
61   Standard_EXPORT   void RemoveShapeFromBuffer( const TCollection_AsciiString& shapeIOR ) ;
62   Standard_EXPORT   void ClearClientBuffer() ;
63   Standard_EXPORT   unsigned int BufferLength() ;
64
65 private: 
66   // Fields PRIVATE
67   //
68   TColStd_SequenceOfAsciiString myIORs ;
69   TopTools_SequenceOfShape myShapes ;
70 };
71
72
73 #endif