Project Chrono: chrono::ChArchive Class Reference

Public Member Functions | Protected Attributes | List of all members
chrono::ChArchive Class Reference
Chrono::Engine » Serialization

## Description

Base class for archives with pointers to shared objects.

`#include <ChArchive.h>`

Inheritance diagram for chrono::ChArchive:
[legend]

## Public Member Functions
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 Attributes
bool | cluster_class_versions
std::unordered_map< std::type_index, int > | class_versions
bool | use_versions

## Member Function Documentation

## ◆ SetClusterClassVersions()

void chrono::ChArchive::SetClusterClassVersions | ( | bool | mcl | ) |

If true, the version number is not saved in each class.

Rather, it is saved only the first time that class is encountered. The same setting must be used for both serialization and deserialization.

## ◆ SetUseVersions()

void chrono::ChArchive::SetUseVersions | ( | bool | muse | ) |

Turn off version info in archives.

By default, version numbers are saved in archives Either save/load both with version info, or not, do not mix because it could give problems in binary archives.

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

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