mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024947: Redesign OCCT legacy type system -- automatic
Automatic upgrade with command "occt_upgdare . -rtti"
This commit is contained in:
@@ -18,9 +18,6 @@
|
||||
#include <Standard_Assert.hxx>
|
||||
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (NCollection_AccAllocator, NCollection_BaseAllocator)
|
||||
IMPLEMENT_STANDARD_RTTIEXT (NCollection_AccAllocator, NCollection_BaseAllocator)
|
||||
|
||||
//=======================================================================
|
||||
//function : NCollection_AccAllocator
|
||||
//purpose : Constructor
|
||||
|
@@ -176,7 +176,7 @@ protected:
|
||||
|
||||
// Declaration of CASCADE RTTI
|
||||
public:
|
||||
DEFINE_STANDARD_RTTI (NCollection_AccAllocator)
|
||||
DEFINE_STANDARD_RTTI (NCollection_AccAllocator, NCollection_BaseAllocator)
|
||||
};
|
||||
|
||||
// Definition of HANDLE object using Standard_DefineHandle.hxx
|
||||
|
@@ -16,11 +16,8 @@
|
||||
#include <NCollection_AlignedAllocator.hxx>
|
||||
#include <NCollection_Buffer.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (NCollection_AlignedAllocator, NCollection_BaseAllocator)
|
||||
IMPLEMENT_STANDARD_RTTIEXT (NCollection_AlignedAllocator, NCollection_BaseAllocator)
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (NCollection_Buffer, Standard_Transient)
|
||||
IMPLEMENT_STANDARD_RTTIEXT (NCollection_Buffer, Standard_Transient)
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : NCollection_AlignedAllocator()
|
||||
|
@@ -46,7 +46,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTI (NCollection_AlignedAllocator)
|
||||
DEFINE_STANDARD_RTTI (NCollection_AlignedAllocator, NCollection_BaseAllocator)
|
||||
|
||||
};
|
||||
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(NCollection_BaseAllocator,MMgt_TShared)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(NCollection_BaseAllocator,MMgt_TShared)
|
||||
|
||||
//=======================================================================
|
||||
//function : Allocate
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#define NCollection_BaseAllocator_HeaderFile
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <NCollection_TypeDef.hxx>
|
||||
|
||||
class Handle(NCollection_BaseAllocator);
|
||||
@@ -79,7 +79,7 @@ class NCollection_BaseAllocator : public MMgt_TShared
|
||||
|
||||
public:
|
||||
// ---------- CasCade RunTime Type Information
|
||||
DEFINE_STANDARD_RTTI(NCollection_BaseAllocator)
|
||||
DEFINE_STANDARD_RTTI(NCollection_BaseAllocator, MMgt_TShared)
|
||||
};
|
||||
|
||||
DEFINE_STANDARD_HANDLE(NCollection_BaseAllocator,MMgt_TShared)
|
||||
|
@@ -130,7 +130,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTI(NCollection_Buffer) // Type definition
|
||||
DEFINE_STANDARD_RTTI(NCollection_Buffer, Standard_Transient) // Type definition
|
||||
|
||||
};
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#ifndef NCollection_DefineHArray1_HeaderFile
|
||||
#define NCollection_DefineHArray1_HeaderFile
|
||||
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <NCollection_DefineArray1.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
|
||||
@@ -39,12 +39,12 @@ class HClassName : public _Array1Type_, public MMgt_TShared { \
|
||||
HClassName (const _Array1Type_& theOther) : _Array1Type_(theOther) {} \
|
||||
const _Array1Type_& Array1 () const { return *this; } \
|
||||
_Array1Type_& ChangeArray1 () { return *this; } \
|
||||
DEFINE_STANDARD_RTTI (HClassName) \
|
||||
DEFINE_STANDARD_RTTI (HClassName, MMgt_TShared) \
|
||||
}; \
|
||||
DEFINE_STANDARD_HANDLE (HClassName, MMgt_TShared)
|
||||
|
||||
#define IMPLEMENT_HARRAY1(HClassName) \
|
||||
IMPLEMENT_STANDARD_HANDLE (HClassName, MMgt_TShared) \
|
||||
IMPLEMENT_STANDARD_RTTIEXT (HClassName, MMgt_TShared)
|
||||
#define IMPLEMENT_HARRAY1(HClassName)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#ifndef NCollection_DefineHArray2_HeaderFile
|
||||
#define NCollection_DefineHArray2_HeaderFile
|
||||
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <NCollection_DefineArray2.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
|
||||
@@ -44,12 +44,12 @@ class HClassName : public _Array2Type_, public MMgt_TShared { \
|
||||
HClassName (const _Array2Type_& theOther) : _Array2Type_(theOther) {} \
|
||||
const _Array2Type_& Array2 () const { return *this; } \
|
||||
_Array2Type_& ChangeArray2 () { return *this; } \
|
||||
DEFINE_STANDARD_RTTI (HClassName) \
|
||||
DEFINE_STANDARD_RTTI (HClassName, MMgt_TShared) \
|
||||
}; \
|
||||
DEFINE_STANDARD_HANDLE (HClassName, MMgt_TShared)
|
||||
|
||||
#define IMPLEMENT_HARRAY2(HClassName) \
|
||||
IMPLEMENT_STANDARD_HANDLE (HClassName, MMgt_TShared) \
|
||||
IMPLEMENT_STANDARD_RTTIEXT (HClassName, MMgt_TShared)
|
||||
#define IMPLEMENT_HARRAY2(HClassName)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#ifndef NCollection_DefineHSequence_HeaderFile
|
||||
#define NCollection_DefineHSequence_HeaderFile
|
||||
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <NCollection_DefineSequence.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
|
||||
@@ -43,11 +43,11 @@ class HClassName : public _SequenceType_, public MMgt_TShared { \
|
||||
void Append (const Handle(HClassName)& theOther) { \
|
||||
_SequenceType_::Append (theOther->ChangeSequence()); \
|
||||
} \
|
||||
DEFINE_STANDARD_RTTI (HClassName) \
|
||||
DEFINE_STANDARD_RTTI (HClassName, MMgt_TShared) \
|
||||
};
|
||||
|
||||
#define IMPLEMENT_HSEQUENCE(HClassName) \
|
||||
IMPLEMENT_STANDARD_HANDLE (HClassName, MMgt_TShared) \
|
||||
IMPLEMENT_STANDARD_RTTIEXT (HClassName, MMgt_TShared)
|
||||
#define IMPLEMENT_HSEQUENCE(HClassName)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#define NCollection_EBTree_HeaderFile
|
||||
|
||||
#include <NCollection_UBTree.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <NCollection_List.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
@@ -208,13 +208,13 @@ class _HEBTREE : public _HUBTREE \
|
||||
const EBTree& ETree () const { return (const EBTree&) Tree(); } \
|
||||
EBTree& ChangeETree () { return (EBTree&) ChangeTree(); } \
|
||||
\
|
||||
DEFINE_STANDARD_RTTI (_HEBTREE) \
|
||||
DEFINE_STANDARD_RTTI (_HEBTREE, _HUBTREE) \
|
||||
/* Type management */ \
|
||||
}; \
|
||||
DEFINE_STANDARD_HANDLE (_HEBTREE, _HUBTREE)
|
||||
|
||||
#define IMPLEMENT_HEBTREE(_HEBTREE, _HUBTREE) \
|
||||
IMPLEMENT_STANDARD_HANDLE (_HEBTREE, _HUBTREE) \
|
||||
IMPLEMENT_STANDARD_RTTIEXT(_HEBTREE, _HUBTREE)
|
||||
#define IMPLEMENT_HEBTREE(_HEBTREE, _HUBTREE)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -17,8 +17,6 @@
|
||||
#include <Standard_OutOfMemory.hxx>
|
||||
#include <Standard_Mutex.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (NCollection_HeapAllocator, NCollection_BaseAllocator)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(NCollection_HeapAllocator, NCollection_BaseAllocator)
|
||||
|
||||
//=======================================================================
|
||||
//function : Allocate
|
||||
|
@@ -44,7 +44,7 @@ class NCollection_HeapAllocator : public NCollection_BaseAllocator
|
||||
|
||||
public:
|
||||
// Declaration of CASCADE RTTI
|
||||
DEFINE_STANDARD_RTTI (NCollection_HeapAllocator)
|
||||
DEFINE_STANDARD_RTTI (NCollection_HeapAllocator, NCollection_BaseAllocator)
|
||||
};
|
||||
|
||||
// Definition of HANDLE object using Standard_DefineHandle.hxx
|
||||
|
@@ -22,8 +22,6 @@
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (NCollection_IncAllocator,NCollection_BaseAllocator)
|
||||
IMPLEMENT_STANDARD_RTTIEXT (NCollection_IncAllocator,NCollection_BaseAllocator)
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@@ -111,7 +111,7 @@ class NCollection_IncAllocator : public NCollection_BaseAllocator
|
||||
|
||||
public:
|
||||
// Declaration of CASCADE RTTI
|
||||
DEFINE_STANDARD_RTTI (NCollection_IncAllocator)
|
||||
DEFINE_STANDARD_RTTI (NCollection_IncAllocator, NCollection_BaseAllocator)
|
||||
};
|
||||
|
||||
// Definition of HANDLE object using Standard_DefineHandle.hxx
|
||||
|
@@ -482,7 +482,7 @@ class _HUBTREE : public _HPARENT \
|
||||
~_HUBTREE () { delete myTree; } \
|
||||
/* Destructor */ \
|
||||
\
|
||||
DEFINE_STANDARD_RTTI (_HUBTREE) \
|
||||
DEFINE_STANDARD_RTTI (_HUBTREE, _HPARENT) \
|
||||
/* Type management */ \
|
||||
\
|
||||
private: \
|
||||
@@ -496,8 +496,8 @@ class _HUBTREE : public _HPARENT \
|
||||
}; \
|
||||
DEFINE_STANDARD_HANDLE (_HUBTREE, _HPARENT)
|
||||
|
||||
#define IMPLEMENT_HUBTREE(_HUBTREE, _HPARENT) \
|
||||
IMPLEMENT_STANDARD_HANDLE (_HUBTREE, _HPARENT) \
|
||||
IMPLEMENT_STANDARD_RTTIEXT(_HUBTREE, _HPARENT)
|
||||
#define IMPLEMENT_HUBTREE(_HUBTREE, _HPARENT)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
Standard_EXPORT virtual void Free (void* theAddress);
|
||||
|
||||
// Declaration of CASCADE RTTI
|
||||
DEFINE_STANDARD_RTTI(NCollection_WinHeapAllocator)
|
||||
DEFINE_STANDARD_RTTI(NCollection_WinHeapAllocator, NCollection_BaseAllocator)
|
||||
|
||||
private:
|
||||
//! Copy constructor - prohibited
|
||||
|
Reference in New Issue
Block a user