Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _GEOM_Function_HeaderFile
00024 #define _GEOM_Function_HeaderFile
00025
00026 #ifndef _Standard_TypeMismatch_HeaderFile
00027 #include <Standard_TypeMismatch.hxx>
00028 #endif
00029 #ifndef _Standard_HeaderFile
00030 #include <Standard.hxx>
00031 #endif
00032 #ifndef _Standard_Macro_HeaderFile
00033 #include <Standard_Macro.hxx>
00034 #endif
00035 #ifndef _Handle_MMgt_TShared_HeaderFile
00036 #include <Handle_MMgt_TShared.hxx>
00037 #endif
00038 #ifndef _MMgt_TShared_HeaderFile
00039 #include <MMgt_TShared.hxx>
00040 #endif
00041 #ifndef _Standard_GUID_HeaderFile
00042 #include <Standard_GUID.hxx>
00043 #endif
00044 #ifndef _TopoDS_Shape_HeaderFile
00045 #include <TopoDS_Shape.hxx>
00046 #endif
00047 #ifndef _TDF_Label_HeaderFile
00048 #include <TDF_Label.hxx>
00049 #endif
00050 #ifndef _TDF_LabelSequence_HeaderFile
00051 #include <TDF_LabelSequence.hxx>
00052 #endif
00053 #ifndef _TColStd_HArray1OfExtendedString_HeaderFile
00054 #include <TColStd_HArray1OfExtendedString.hxx>
00055 #endif
00056
00057 class Handle_TColStd_HArray1OfReal;
00058 class Handle_TColStd_HArray1OfInteger;
00059 class Handle_TColStd_HSequenceOfTransient;
00060 class Handle_TColStd_HArray1OfExtendedString;
00061
00062 class Standard_Transient;
00063 class Handle_Standard_Type;
00064 class Handle(MMgt_TShared);
00065 class GEOM_Function;
00066
00067 #include <TCollection_AsciiString.hxx>
00068 #include <TDataStd_ListOfExtendedString.hxx>
00069
00070 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Function);
00071
00072 class Handle(GEOM_Function) : public Handle(MMgt_TShared) {
00073 public:
00074 inline void* operator new(size_t,void* anAddress)
00075 {
00076 return anAddress;
00077 }
00078 inline void* operator new(size_t size)
00079 {
00080 return Standard::Allocate(size);
00081 }
00082 inline void operator delete(void *anAddress)
00083 {
00084 if (anAddress) Standard::Free((Standard_Address&)anAddress);
00085 }
00086
00087 Handle(GEOM_Function)():Handle(MMgt_TShared)() {}
00088 Handle(GEOM_Function)(const Handle(GEOM_Function)& aHandle) : Handle(MMgt_TShared)(aHandle)
00089 {
00090 }
00091
00092 Handle(GEOM_Function)(const GEOM_Function* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
00093 {
00094 }
00095
00096 Handle(GEOM_Function)& operator=(const Handle(GEOM_Function)& aHandle)
00097 {
00098 Assign(aHandle.Access());
00099 return *this;
00100 }
00101
00102 Handle(GEOM_Function)& operator=(const GEOM_Function* anItem)
00103 {
00104 Assign((Standard_Transient *)anItem);
00105 return *this;
00106 }
00107
00108 GEOM_Function* operator->()
00109 {
00110 return (GEOM_Function *)ControlAccess();
00111 }
00112
00113 GEOM_Function* operator->() const
00114 {
00115 return (GEOM_Function *)ControlAccess();
00116 }
00117
00118 Standard_EXPORT ~Handle(GEOM_Function)() {};
00119
00120 Standard_EXPORT static const Handle(GEOM_Function) DownCast(const Handle(Standard_Transient)& AnObject);
00121 };
00122
00123 class GEOM_Function : public MMgt_TShared
00124 {
00125
00126 public:
00127
00128 inline void* operator new(size_t,void* anAddress)
00129 {
00130 return anAddress;
00131 }
00132 inline void* operator new(size_t size)
00133 {
00134 return Standard::Allocate(size);
00135 }
00136 inline void operator delete(void *anAddress)
00137 {
00138 if (anAddress) Standard::Free((Standard_Address&)anAddress);
00139 }
00140
00141
00142
00143 Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_();
00144 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
00145 { return STANDARD_TYPE(GEOM_Function) ; }
00146 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
00147 { return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); }
00148
00149
00150 private:
00151 GEOM_Function(const TDF_Label& theEntry) { _label = theEntry; }
00152
00153 public:
00154
00155
00156 Standard_EXPORT static const Standard_GUID& GetFunctionTreeID();
00157
00158
00159 Standard_EXPORT static const Standard_GUID& GetDependencyID();
00160
00161
00162 Standard_EXPORT static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry);
00163
00164
00165 Standard_EXPORT GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType);
00166 Standard_EXPORT ~GEOM_Function() {;}
00167
00168 Standard_EXPORT TDF_Label GetOwnerEntry();
00169
00170
00171
00172
00173 Standard_EXPORT TopoDS_Shape GetValue();
00174
00175
00176 Standard_EXPORT void SetValue(TopoDS_Shape& theShape);
00177
00178
00179 Standard_EXPORT TDF_Label& GetEntry() { return _label; }
00180
00181
00182 Standard_EXPORT int GetType();
00183
00184
00185 Standard_EXPORT Standard_GUID GetDriverGUID();
00186
00187
00188 Standard_EXPORT TCollection_AsciiString GetDescription();
00189
00190
00191 Standard_EXPORT void SetDescription(const TCollection_AsciiString& theDescription);
00192
00193
00194
00195
00196 Standard_EXPORT void SetReal(int thePosition, double theValue);
00197
00198
00199 Standard_EXPORT double GetReal(int thePosition);
00200
00201
00202 Standard_EXPORT void SetRealArray(int thePosition, const Handle(TColStd_HArray1OfReal)& theArray);
00203
00204
00205 Standard_EXPORT Handle(TColStd_HArray1OfReal) GetRealArray(int thePosition);
00206
00207
00208 Standard_EXPORT void SetInteger(int thePosition, int theValue);
00209
00210
00211 Standard_EXPORT int GetInteger(int thePosition);
00212
00213
00214 Standard_EXPORT void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray);
00215
00216
00217 Standard_EXPORT Handle(TColStd_HArray1OfInteger) GetIntegerArray(int thePosition);
00218
00219
00220 Standard_EXPORT void SetReference(int thePosition, Handle(GEOM_Function) theReference);
00221
00222
00223 Standard_EXPORT void SetString(int thePosition, const TCollection_AsciiString& theValue);
00224
00225
00226 Standard_EXPORT TCollection_AsciiString GetString(int thePosition);
00227
00228
00229 Standard_EXPORT Handle(GEOM_Function) GetReference(int thePosition);
00230
00231
00232 Standard_EXPORT void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray);
00233
00234
00235 Standard_EXPORT Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition);
00236
00237
00238 Standard_EXPORT static const Standard_GUID& GetReferencesTreeID();
00239
00240
00241 Standard_EXPORT void SetReferenceList (int thePosition,
00242 const Handle(TColStd_HSequenceOfTransient)& theRefList);
00243
00244
00245 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition);
00246
00247
00248
00249
00250
00251
00252
00253
00254 Standard_EXPORT bool IsDone() { return _isDone; }
00255
00256
00257 Standard_EXPORT void GetDependency(TDF_LabelSequence& theSeq);
00258
00259
00260 Standard_EXPORT void AddSubShapeReference (Handle(GEOM_Function) theSubShape);
00261 Standard_EXPORT void RemoveSubShapeReference(Handle(GEOM_Function) theSubShape);
00262 Standard_EXPORT bool HasSubShapeReferences();
00263 Standard_EXPORT const TDataStd_ListOfExtendedString& GetSubShapeReferences();
00264
00265
00266 Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True);
00267
00268
00269
00270 Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label& theArgumentRefEntry,
00271 const Standard_Boolean create = Standard_True);
00272
00273
00274 Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True);
00275
00276 private:
00277
00278 TDF_Label _label;
00279 bool _isDone;
00280 };
00281
00282 #endif