chrono::ChClassRegistration< t > Class Template Reference

Description

template<class t>
class chrono::ChClassRegistration< t >

Macro to create a ChDetect_ArchiveINconstructor

Macro to create a ChDetect_ArchiveOUTconstructor that can be used in templates, to select which specialized template to use Macro to create a ChDetect_ArchiveOUT that can be used in templates, to select which specialized template to use Macro to create a ChDetect_ArchiveIN that can be used in templates, to select which specialized template to use Macro to create a ChDetect_ArchiveContainerName that can be used in templates, to select which specialized template to use Class for registration data of classes whose objects can be created via a class factory.

#include <ChClassFactory.h>

Inheritance diagram for chrono::ChClassRegistration< t >:
Collaboration diagram for chrono::ChClassRegistration< t >:

Public Member Functions

 ChClassRegistration (const char *mtag_name)
 Creator (adds this to the global list of ChClassRegistration<t> objects).
 
virtual ~ChClassRegistration ()
 Destructor (removes this from the global list of ChClassRegistration<t> objects).
 
virtual void * create ()
 The signature of create method for derived classes. Calls new().
 
virtual void * create (ChArchiveIn &marchive)
 Call the ArchiveINconstructor(ChArchiveIn&) function if available (deserializes constructor params and return new()), otherwise just call new().
 
virtual std::type_index get_type_index ()
 Get the type_info of the class.
 
virtual std::string & get_tag_name ()
 Get the name used for registering.
 
virtual bool is_polymorphic () override
 Tells if the class is polymorphic.
 
virtual bool is_default_constructible () override
 Tells if the class is default constructible.
 
virtual bool is_abstract () override
 Tells if the class is abstract.
 
virtual bool has_ArchiveINconstructor () override
 Tells if it implements the function.
 
virtual bool has_ArchiveIN () override
 Tells if it implements the function.
 

Protected Member Functions

template<class Tc = t>
enable_if< std::is_default_constructible< Tc >::value, void * >::type _create ()
 
template<class Tc = t>
enable_if< !std::is_default_constructible< Tc >::value, void * >::type _create ()
 
template<class Tc = t>
enable_if< ChDetect_ArchiveINconstructor< Tc >::value, void * >::type _archive_in_create (ChArchiveIn &marchive)
 
template<class Tc = t>
enable_if< !ChDetect_ArchiveINconstructor< Tc >::value, void * >::type _archive_in_create (ChArchiveIn &marchive)
 
template<class Tc = t>
enable_if< ChDetect_ArchiveINconstructor< Tc >::value, bool >::type _has_ArchiveINconstructor ()
 
template<class Tc = t>
enable_if< !ChDetect_ArchiveINconstructor< Tc >::value, bool >::type _has_ArchiveINconstructor ()
 
template<class Tc = t>
enable_if< ChDetect_ArchiveIN< Tc >::value, bool >::type _has_ArchiveIN ()
 
template<class Tc = t>
enable_if< !ChDetect_ArchiveIN< Tc >::value, bool >::type _has_ArchiveIN ()
 
std::string & _get_tag_name ()
 

Protected Attributes

std::string m_sTagName
 Name of the class for dynamic creation.
 

The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/core/ChClassFactory.h