ScummVM API documentation
Ultima::Shared::ConfSerializer Class Reference

#include <conf_serializer.h>

Public Member Functions

 ConfSerializer (bool saving)
 
 ~ConfSerializer ()
 
bool isSaving () const
 
bool isLoading () const
 
void syncAsString (const Common::String &key, Common::String &value, const char *defaultValue=nullptr)
 
void syncAsBool (const Common::String &key, bool &value, bool defaultValue=false)
 
template<typename T >
void syncAsInt (const Common::String &key, T &value, T defaultValue=0)
 

Detailed Description

A simplified serializer class for reading/writing stuff from ConfMan

Constructor & Destructor Documentation

◆ ConfSerializer()

Ultima::Shared::ConfSerializer::ConfSerializer ( bool  saving)
inline

Constructor

◆ ~ConfSerializer()

Ultima::Shared::ConfSerializer::~ConfSerializer ( )
inline

Destructor

Member Function Documentation

◆ isSaving()

bool Ultima::Shared::ConfSerializer::isSaving ( ) const
inline

Returns true if saving

◆ isLoading()

bool Ultima::Shared::ConfSerializer::isLoading ( ) const
inline

Returns true if loading

◆ syncAsString()

void Ultima::Shared::ConfSerializer::syncAsString ( const Common::String key,
Common::String value,
const char *  defaultValue = nullptr 
)
inline

Syncs a string

◆ syncAsBool()

void Ultima::Shared::ConfSerializer::syncAsBool ( const Common::String key,
bool &  value,
bool  defaultValue = false 
)
inline

Syncs a boolean

◆ syncAsInt()

template<typename T >
void Ultima::Shared::ConfSerializer::syncAsInt ( const Common::String key,
T &  value,
defaultValue = 0 
)
inline

Syncs an integer


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