chrono::ChFunctorArchiveIn Class Referenceabstract


Functor to call the ArchiveIN function for unrelated classes that implemented them.

This helps stripping out the templating, to make ChArchiveIn easier and equippable with virtual functions.

#include <ChArchive.h>

Inherited by chrono::ChFunctorArchiveInSpecific< TClass >, and chrono::ChFunctorArchiveInSpecificPtr< TClass >.

Public Member Functions

virtual void CallArchiveIn (ChArchiveIn &marchive)=0
 Use this to call member function ArchiveIn.
virtual void CallArchiveInConstructor (ChArchiveIn &marchive, const char *classname)=0
 Use this to call an (optional) static member function ArchiveINconstructor. More...
virtual void CallConstructor (ChArchiveIn &marchive, const char *classname)=0
 Use this to create a new object as pt2Object = new myclass() If classname not registered, throws exception.
virtual void SetRawPtr (void *mptr)=0
virtual void * GetRawPtr ()=0
virtual bool IsPolymorphic ()=0

Member Function Documentation

virtual void chrono::ChFunctorArchiveIn::CallArchiveInConstructor ( ChArchiveIn marchive,
const char *  classname 
pure virtual

Use this to call an (optional) static member function ArchiveINconstructor.

This is expected to a) deserialize constructor parameters, b) create a new obj as pt2Object = new myclass(params..). If classname not registered, call T::ArchiveINconstructor() If ArchiveINconstructor() is not provided, simply creates a new object as new obj() in CallNewPolimorphic.