Salome HOME
DCQ: prepare V2.0.0
[modules/kernel.git] / src / OBJECT / SALOME_InteractiveObject.hxx
1 //  SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOME_InteractiveObject.hxx
25 //  Module : SALOME
26
27 #ifndef _SALOME_InteractiveObject_HeaderFile
28 #define _SALOME_InteractiveObject_HeaderFile
29
30 #ifndef _Standard_HeaderFile
31 #include <Standard.hxx>
32 #endif
33 #ifndef _Handle_SALOME_InteractiveObject_HeaderFile
34 #include <Handle_SALOME_InteractiveObject.hxx>
35 #endif
36
37 #ifndef _Standard_CString_HeaderFile
38 #include <Standard_CString.hxx>
39 #endif
40 #ifndef _MMgt_TShared_HeaderFile
41 #include <MMgt_TShared.hxx>
42 #endif
43 #ifndef _Standard_Boolean_HeaderFile
44 #include <Standard_Boolean.hxx>
45 #endif
46
47
48 class SALOME_InteractiveObject : public MMgt_TShared {
49
50 public:
51
52     void* operator new(size_t,void* anAddress) 
53       {
54         return anAddress;
55       }
56     void* operator new(size_t size) 
57       { 
58         return Standard::Allocate(size); 
59       }
60     void  operator delete(void *anAddress) 
61       { 
62         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
63       }
64  // Methods PUBLIC
65  // 
66 Standard_EXPORT   SALOME_InteractiveObject();
67 Standard_EXPORT   SALOME_InteractiveObject(const Standard_CString anEntry, 
68                                            const Standard_CString aComponentDataType,
69                                            const Standard_CString aName = "");
70 Standard_EXPORT   void setEntry(const Standard_CString anEntry) ;
71 Standard_EXPORT   Standard_CString getEntry() ;
72 Standard_EXPORT   void setName(const Standard_CString aName) ;
73 Standard_EXPORT   Standard_CString getName() ;
74 Standard_EXPORT   Standard_Boolean hasEntry() ;
75 Standard_EXPORT   virtual  Standard_Boolean isSame(const Handle(SALOME_InteractiveObject)& anIO) ;
76
77 Standard_EXPORT   Standard_Boolean hasReference() ;
78 Standard_EXPORT   Standard_CString getReference() ;
79 Standard_EXPORT   void setReference(const Standard_CString aReference) ;
80
81 Standard_EXPORT   void setComponentDataType(const Standard_CString ComponentDataType) ;
82 Standard_EXPORT   Standard_CString getComponentDataType() ;
83 Standard_EXPORT   Standard_Boolean isComponentType(const Standard_CString ComponentDataType) ;
84
85 Standard_EXPORT   ~SALOME_InteractiveObject();
86
87
88
89
90  // Type management
91  //
92  Standard_EXPORT friend Handle_Standard_Type& SALOME_InteractiveObject_Type_();
93  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
94  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
95
96 protected:
97
98  // Methods PROTECTED
99  // 
100
101
102  // Fields PROTECTED
103  //
104 Standard_CString myReference;
105 Standard_CString myEntry;
106 Standard_CString myName;
107 Standard_CString myComponentDataType;
108
109 private: 
110
111  // Methods PRIVATE
112  // 
113
114
115  // Fields PRIVATE
116  //
117
118
119 };
120
121
122
123
124
125 // other Inline functions and methods (like "C++: function call" methods)
126 //
127
128
129 #endif