Open CASCADE Technology  7.1.0.beta
Data Structures | Namespaces | Macros | Functions
Standard_Type.hxx File Reference
#include <Standard.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Transient.hxx>
#include <Standard_OStream.hxx>
#include <typeinfo>

Data Structures

class  opencascade::type_instance< T >
 Template class providing instantiation of type descriptors as singletons. The descriptors are defined as static variables in function get(), which is essential to ensure that they are initialized in correct sequence. More...
 
class  Standard_Type
 This class provides legacy interface (type descriptor) to run-time type information (RTTI) for OCCT classes inheriting from Standard_Transient. More...
 
class  opencascade::type_instance< T >
 Template class providing instantiation of type descriptors as singletons. The descriptors are defined as static variables in function get(), which is essential to ensure that they are initialized in correct sequence. More...
 
class  opencascade::type_instance< void >
 Specialization of type descriptor instance for void; returns null handle. More...
 

Namespaces

 opencascade
 

Macros

#define STANDARD_TYPE(theType)   theType::get_type_descriptor()
 Helper macro to get instance of a type descriptor for a class in a legacy way. More...
 
#define DEFINE_STANDARD_RTTI_INLINE(Class, Base)
 Helper macro to be included in definition of the classes inheriting Standard_Transient to enable use of OCCT RTTI. More...
 
#define DEFINE_STANDARD_RTTIEXT(Class, Base)
 Helper macro to be included in definition of the classes inheriting Standard_Transient to enable use of OCCT RTTI. More...
 
#define IMPLEMENT_STANDARD_RTTIEXT(Class, Base)
 Defines implementation of type descriptor and DynamicType() function. More...
 

Functions

Standard_OStreamoperator<< (Standard_OStream &theStream, const Handle< Standard_Type > &theType)
 Operator printing type descriptor to stream. More...
 

Macro Definition Documentation

#define DEFINE_STANDARD_RTTI_INLINE (   Class,
  Base 
)
Value:
public: \
typedef Base base_type; \
static const char* get_type_name () { return #Class; } \
static const Handle(Standard_Type)& get_type_descriptor () { return Standard_Type::Instance<Class>(); } \
virtual const Handle(Standard_Type)& DynamicType() const Standard_OVERRIDE \
{ return STANDARD_TYPE(Class); }
#define Handle(Class)
Define Handle() macro.
Definition: Standard_Handle.hxx:398
#define STANDARD_TYPE(theType)
Helper macro to get instance of a type descriptor for a class in a legacy way.
Definition: Standard_Type.hxx:26
This class provides legacy interface (type descriptor) to run-time type information (RTTI) for OCCT c...
Definition: Standard_Type.hxx:86
#define Standard_OVERRIDE
Definition: Standard_Macro.hxx:29

Helper macro to be included in definition of the classes inheriting Standard_Transient to enable use of OCCT RTTI.

Inline version, does not require IMPLEMENT_STANDARD_RTTIEXT, but when used for big hierarchies of classes may cause considerable increase of size of binaries.

#define DEFINE_STANDARD_RTTIEXT (   Class,
  Base 
)
Value:
public: \
typedef Base base_type; \
static const char* get_type_name () { return #Class; } \
Standard_EXPORT static const Handle(Standard_Type)& get_type_descriptor (); \
Standard_EXPORT virtual const Handle(Standard_Type)& DynamicType() const Standard_OVERRIDE;
#define Handle(Class)
Define Handle() macro.
Definition: Standard_Handle.hxx:398
This class provides legacy interface (type descriptor) to run-time type information (RTTI) for OCCT c...
Definition: Standard_Type.hxx:86
#define Standard_OVERRIDE
Definition: Standard_Macro.hxx:29

Helper macro to be included in definition of the classes inheriting Standard_Transient to enable use of OCCT RTTI.

Out-of-line version, requires IMPLEMENT_STANDARD_RTTIEXT.

#define IMPLEMENT_STANDARD_RTTIEXT (   Class,
  Base 
)
Value:
const Handle(Standard_Type)& Class::get_type_descriptor () { return Standard_Type::Instance<Class>(); } \
const Handle(Standard_Type)& Class::DynamicType() const { return get_type_descriptor(); }
#define Handle(Class)
Define Handle() macro.
Definition: Standard_Handle.hxx:398
This class provides legacy interface (type descriptor) to run-time type information (RTTI) for OCCT c...
Definition: Standard_Type.hxx:86

Defines implementation of type descriptor and DynamicType() function.

#define STANDARD_TYPE (   theType)    theType::get_type_descriptor()

Helper macro to get instance of a type descriptor for a class in a legacy way.

Function Documentation

Standard_OStream& operator<< ( Standard_OStream theStream,
const Handle< Standard_Type > &  theType 
)
inline

Operator printing type descriptor to stream.