cereal_fwd
Fork of cereal library adding archive supporting forward compatibility
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
cereal::ExtendableBinaryInputArchive::Options Class Reference

A class containing various advanced options for the ExtendableBinaryInput archive. More...

#include </home/breiker/code/git/cereal_fwd_github/include/cereal/archives/extendable_binary.hpp>

Public Types

enum  Endianness : std::uint8_t { big, little }
 Represents desired endianness.
 

Public Member Functions

 Options (Endianness inputEndian_=getEndianness(), std::size_t maxSharedBufferSize_=std::numeric_limits< std::size_t >::max(), bool ignoreUnknownPolymorphicTypes_=true)
 Specify specific options for the ExtendableBinaryInputArchive. More...
 
Options & littleEndian ()
 Set desired endianess of loaded data to little endian.
 
Options & bigEndian ()
 Set desired endianess of loaded data to big endian.
 
Options & maxSharedBufferSize (std::size_t maxSharedBufferSize_)
 Set max buffer size for shared data. More...
 
Options & ignoreUnknownPolymorphicTypes (bool ignore_)
 Don't throw exception when pointer to object of unknown polymorphic type is loaded. More...
 

Static Public Member Functions

static Options Default ()
 Default options, preserve system endianness.
 

Friends

class ExtendableBinaryInputArchive
 

Detailed Description

A class containing various advanced options for the ExtendableBinaryInput archive.

Constructor & Destructor Documentation

◆ Options()

cereal::ExtendableBinaryInputArchive::Options::Options ( Endianness  inputEndian_ = getEndianness(),
std::size_t  maxSharedBufferSize_ = std::numeric_limits<std::size_t>::max(),
bool  ignoreUnknownPolymorphicTypes_ = true 
)
inlineexplicit

Specify specific options for the ExtendableBinaryInputArchive.

Parameters
inputEndian_The desired endianness of loaded (input) data
maxSharedBufferSize_Maximum data size in bytes saved for shared pointers for which data was not loaded explicitly and may be needed to be available if same pointer is needed to be loaded later in stream.
ignoreUnknownPolymorphicTypes_Don't throw exception when pointer to object of unknown polymorphic type is loaded. Pointer is set to nullptr in this case.

Member Function Documentation

◆ ignoreUnknownPolymorphicTypes()

Options& cereal::ExtendableBinaryInputArchive::Options::ignoreUnknownPolymorphicTypes ( bool  ignore_)
inline

Don't throw exception when pointer to object of unknown polymorphic type is loaded.

Pointer is set to nullptr in this case.

Parameters
ignore_if true ignore

◆ maxSharedBufferSize()

Options& cereal::ExtendableBinaryInputArchive::Options::maxSharedBufferSize ( std::size_t  maxSharedBufferSize_)
inline

Set max buffer size for shared data.

Parameters
maxSharedBufferSize_Maximum data size in bytes saved for shared pointers for which data was not loaded explicitly and may be needed to be available if same pointer is needed to be loaded later in stream.

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