cgv
Loading...
Searching...
No Matches
cgv::reflect::reflection_traits_impl< T, B, base_is_abst > Struct Template Reference

implementation of the reflection traits providing type specific interface for variable base class More...

#include <reflection_traits.h>

Inheritance diagram for cgv::reflect::reflection_traits_impl< T, B, base_is_abst >:
cgv::reflect::reflection_traits_string_impl< has_str, T, abst_reflection_traits > cgv::reflect::reflection_traits_string_impl< true, T, abst_reflection_traits > cgv::reflect::reflection_traits_string_impl< has_str, T, B > cgv::reflect::reflection_traits_string_impl< true, T, B > cgv::reflect::reflection_traits< T, RTK_EXTERNAL_SELF_REFLECT, false > cgv::reflect::reflection_traits< T, RTK_EXTERNAL_SELF_REFLECT > cgv::reflect::reflection_traits< T, KIND, has_str > cgv::reflect::extern_reflection_traits_impl< D, reflection_traits< T, RTK_EXTERNAL_SELF_REFLECT, false > > cgv::reflect::extern_reflection_traits_impl< D, reflection_traits< T, RTK_EXTERNAL_SELF_REFLECT > > cgv::reflect::extern_reflection_traits< T, D > cgv::reflect::extern_string_reflection_traits< T, D >

Public Member Functions

unsigned size () const
 return the size of the type
 
void * new_instance () const
 construct an instance on the heap with the new operator
 
void delete_instance (void *instance_ptr) const
 delete an instance with the delete operator
 
void * new_instances (unsigned n) const
 construct n instances on the heap with the new operator
 
void delete_instances (void *instance_array) const
 delete instances with the delete [] operator
 
cgv::type::info::TypeId get_type_id () const
 return the type id
 
const char * get_type_name () const
 return the type name
 
bool is_enum_type () const
 return whether type is an enum type - this is independent of whether enum interface is implemented
 

Detailed Description

template<typename T, typename B, bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
struct cgv::reflect::reflection_traits_impl< T, B, base_is_abst >

implementation of the reflection traits providing type specific interface for variable base class

Definition at line 94 of file reflection_traits.h.

Member Function Documentation

◆ delete_instance()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
void cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::delete_instance ( void *  instance_ptr) const
inline

delete an instance with the delete operator

Definition at line 101 of file reflection_traits.h.

◆ delete_instances()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
void cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::delete_instances ( void *  instance_array) const
inline

delete instances with the delete [] operator

Definition at line 105 of file reflection_traits.h.

◆ get_type_id()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
cgv::type::info::TypeId cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::get_type_id ( ) const
inline

return the type id

Definition at line 107 of file reflection_traits.h.

◆ get_type_name()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
const char * cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::get_type_name ( ) const
inline

return the type name

Definition at line 109 of file reflection_traits.h.

References cgv::type::info::type_name< T >::get_name().

◆ is_enum_type()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
bool cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::is_enum_type ( ) const
inline

return whether type is an enum type - this is independent of whether enum interface is implemented

Definition at line 111 of file reflection_traits.h.

◆ new_instance()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
void * cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::new_instance ( ) const
inline

construct an instance on the heap with the new operator

Definition at line 99 of file reflection_traits.h.

◆ new_instances()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
void * cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::new_instances ( unsigned  n) const
inline

construct n instances on the heap with the new operator

Definition at line 103 of file reflection_traits.h.

◆ size()

template<typename T , typename B , bool base_is_abst = cgv::type::cond::is_abstract<B>::value>
unsigned cgv::reflect::reflection_traits_impl< T, B, base_is_abst >::size ( ) const
inline

return the size of the type

Definition at line 97 of file reflection_traits.h.


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