chrono::ChClassRegistration< t > Class Template Reference

Description

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

Macro to create a ChDetect_ArchiveINconstructor

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.
 

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