Project Chrono: chrono::ChArchiveInXML Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chrono::ChArchiveInXML Class Reference

## Description

This is a class for deserializing from XML archives.

`#include <ChArchiveXML.h>`

Inheritance diagram for chrono::ChArchiveInXML:
[legend]
Collaboration diagram for chrono::ChArchiveInXML:
[legend]

## Public Member Functions
| ChArchiveInXML (std::istream &stream_in)
rapidxml::xml_node * | GetValueFromNameOrArray (const std::string &mname)
virtual bool | in (ChNameValue< bool > bVal) override
virtual bool | in (ChNameValue< int > bVal) override
virtual bool | in (ChNameValue< double > bVal) override
virtual bool | in (ChNameValue< float > bVal) override
virtual bool | in (ChNameValue< char > bVal) override
virtual bool | in (ChNameValue< unsigned int > bVal) override
virtual bool | in (ChNameValue< std::string > bVal) override
virtual bool | in (ChNameValue< unsigned long > bVal) override
virtual bool | in (ChNameValue< unsigned long long > bVal) override
virtual bool | in (ChNameValue< ChEnumMapperBase > bVal) override
virtual bool | in_array_pre (const std::string &name, size_t &msize) override
virtual void | in_array_between (const std::string &name) override
virtual void | in_array_end (const std::string &name) override
virtual bool | in (ChNameValue< ChFunctorArchiveIn > bVal) override
virtual bool | in_ref (ChNameValue< ChFunctorArchiveIn > bVal, void **ptr, std::string &true_classname) override
virtual bool | TryTolerateMissingTokens (bool try_tolerate) override
| Suggest the archive to tolerate missing tokens/properties in the archive file; The function returns the new settings: for those classes for which CanTolerateMissingTokens returns false this function does not have any effect and will trivially return false.
Public Member Functions inherited from chrono::ChArchiveIn
void | RebindExternalPointer (void *mptr, size_t ID)
| Use the following to declare object IDs that must not be de-serialized but rather be 'rebind' to already-existing external pointers, given unique IDs.
void | RebindExternalPointer (std::shared_ptr< void > mptr, size_t ID)
| Use the following to declare object IDs that must not be de-serialized but rather be 'rebind' to already-existing external shared pointers, given unique IDs.
bool | CanTolerateMissingTokens () const
| Returns true if the class can tolerate missing tokes; on the contrary the archive must contain a complete set of info about the object that is going to be loaded.
bool | GetTolerateMissingTokens () const
| Returns true if the archive is currently tolerating missing tokens.
template<class T>
bool | in (ChNameValue< ChEnumMapper< T > > bVal)
template<class T, size_t N>
bool | in (ChNameValue< T[N]> bVal)
template<class T>
bool | in (ChNameValue< std::vector< T > > bVal)
template<class T>
bool | in (ChNameValue< std::list< T > > bVal)
template<class T, class Tv>
bool | in (ChNameValue< std::pair< T, Tv > > bVal)
template<class T, class Tv>
bool | in (ChNameValue< std::unordered_map< T, Tv > > bVal)
template<class T, class Tv>
bool | in (ChNameValue< std::map< T, Tv > > bVal)
template<class T>
bool | in (ChNameValue< std::shared_ptr< T > > bVal)
template<class T>
bool | in (ChNameValue< T * > bVal)
template<class T>
bool | in (ChNameValue< T > bVal)
template<class T>
ChArchiveIn & | operator>> (ChNameValue< T > bVal)
| Operator to allow easy serialization as myarchive << mydata;.
int | VersionRead ()
template<class T>
int | VersionRead ()
Public Member Functions inherited from chrono::ChArchive
void | SetUseVersions (bool muse)
| Turn off version info in archives.
void | SetClusterClassVersions (bool mcl)
| If true, the version number is not saved in each class.

## Protected Member Functions
void | token_notfound (const std::string &mname)
Protected Member Functions inherited from chrono::ChArchiveIn
void | PutNewPointer (void *object, size_t obj_ID)
| Find a pointer in pointer map: eventually add it to map i f it was not previously inserted.
virtual int | in_version (const std::type_index mtypeid)

## Protected Attributes
std::istream & | m_istream
rapidxml::xml_document | document
rapidxml::xml_node * | level
std::stack< rapidxml::xml_node<> * > | levels
std::stack< bool > | is_array
std::stack< int > | array_index
std::vector< char > | buffer
Protected Attributes inherited from chrono::ChArchiveIn
std::unordered_map< void *, size_t > | internal_ptr_id
std::unordered_map< size_t, void * > | internal_id_ptr
std::unordered_map< void *, shared_pair_type > | shared_ptr_map
std::unordered_map< size_t, void * > | external_id_ptr
| container of pointers marker with external IDs to re-bind instead of de-serializing
bool | can_tolerate_missing_tokens
bool | try_tolerate_missing_tokens
Protected Attributes inherited from chrono::ChArchive
bool | cluster_class_versions
std::unordered_map< std::type_index, int > | class_versions
bool | use_versions

## Additional Inherited Members
Protected Types inherited from chrono::ChArchiveIn
using | shared_pair_type = std::pair<std::shared_ptr<void>, std::string>

## Member Function Documentation

## ◆ in() [1/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< bool > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [2/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< char > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [3/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< ChEnumMapperBase > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [4/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< ChFunctorArchiveIn > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [5/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< double > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [6/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< float > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [7/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< int > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [8/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< std::string > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [9/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< unsigned int > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [10/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< unsigned long > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in() [11/11]

bool chrono::ChArchiveInXML::in | ( | ChNameValue< unsigned long long > | bVal | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in_array_between()

void chrono::ChArchiveInXML::in_array_between | ( | const std::string & | name | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in_array_end()

void chrono::ChArchiveInXML::in_array_end | ( | const std::string & | name | ) |
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in_array_pre()

bool chrono::ChArchiveInXML::in_array_pre | ( | const std::string & | name,
|  | size_t & | msize )
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ in_ref()

bool chrono::ChArchiveInXML::in_ref | ( | ChNameValue< ChFunctorArchiveIn > | bVal,
|  | void ** | ptr,
|  | std::string & | true_classname )
| overridevirtual

Implements chrono::ChArchiveIn.

## ◆ TryTolerateMissingTokens()

bool chrono::ChArchiveInXML::TryTolerateMissingTokens | ( | bool | try_tolerate | ) |
| overridevirtual

Suggest the archive to tolerate missing tokens/properties in the archive file; The function returns the new settings: for those classes for which CanTolerateMissingTokens returns false this function does not have any effect and will trivially return false.

Reimplemented from chrono::ChArchiveIn.

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

- D:/W/B/src/chrono-9.0.1/src/chrono/serialization/ChArchiveXML.h
- D:/W/B/src/chrono-9.0.1/src/chrono/serialization/ChArchiveXML.cpp