Open CASCADE Technology  7.5.0
Static Public Member Functions

opencascade::type_instance< T > Class Template Reference

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...

#include <Standard_Type.hxx>

Static Public Member Functions

static const Handle< Standard_Type > & get ()
 

Detailed Description

template<typename T>
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.

For compilers that do not provide thread-safe initialization of static variables (C++11 feature, N2660), additional global variable is defined for each type to hold its type descriptor. These globals ensure that all types get initialized during the library loading and thus no concurrency occurs when type system is accessed from multiple threads.

Member Function Documentation

◆ get()

template<typename T >
const Handle< Standard_Type > & opencascade::type_instance< T >::get ( )
static

The documentation for this class was generated from the following file: