cereal
A C++11 library for serialization
Macros
macros.hpp File Reference

Preprocessor macros that can customise the cereal library. More...

Go to the source code of this file.

Macros

#define CEREAL_SERIALIZE_FUNCTION_NAME   serialize
 The serialization/deserialization function name to search for. More...
 
#define CEREAL_LOAD_FUNCTION_NAME   load
 The deserialization (load) function name to search for. More...
 
#define CEREAL_SAVE_FUNCTION_NAME   save
 The serialization (save) function name to search for. More...
 
#define CEREAL_LOAD_MINIMAL_FUNCTION_NAME   load_minimal
 The deserialization (load_minimal) function name to search for. More...
 
#define CEREAL_SAVE_MINIMAL_FUNCTION_NAME   save_minimal
 The serialization (save_minimal) function name to search for. More...
 

Detailed Description

Preprocessor macros that can customise the cereal library.

By default, cereal looks for serialization functions with very specific names, that is: serialize, load, save, load_minimal, or save_minimal.

This file allows an advanced user to change these names to conform to some other style or preference. This is implemented using preprocessor macros.

As a result of this, in internal cereal code you will see macros used for these function names. In user code, you should name the functions like you normally would and not use the macros to improve readability.

Macro Definition Documentation

#define CEREAL_LOAD_FUNCTION_NAME   load

The deserialization (load) function name to search for.

You can define CEREAL_LOAD_FUNCTION_NAME to be different assuming you do so before this file is included.

#define CEREAL_LOAD_MINIMAL_FUNCTION_NAME   load_minimal

The deserialization (load_minimal) function name to search for.

You can define CEREAL_LOAD_MINIMAL_FUNCTION_NAME to be different assuming you do so before this file is included.

#define CEREAL_SAVE_FUNCTION_NAME   save

The serialization (save) function name to search for.

You can define CEREAL_SAVE_FUNCTION_NAME to be different assuming you do so before this file is included.

#define CEREAL_SAVE_MINIMAL_FUNCTION_NAME   save_minimal

The serialization (save_minimal) function name to search for.

You can define CEREAL_SAVE_MINIMAL_FUNCTION_NAME to be different assuming you do so before this file is included.

#define CEREAL_SERIALIZE_FUNCTION_NAME   serialize

The serialization/deserialization function name to search for.

You can define CEREAL_SERIALIZE_FUNCTION_NAME to be different assuming you do so before this file is included.