Antkeeper  0.0.1
Functions
settings.hpp File Reference
#include "game/game.hpp"
#include <engine/debug/log.hpp>

Go to the source code of this file.

Functions

template<class T >
bool read_or_write_setting (::game &ctx, hash::fnv1a32_t key, T &value)
 Reads a setting if found, inserts a setting if not found, and overwrites a setting if a type mismatch occurs. More...
 

Function Documentation

◆ read_or_write_setting()

template<class T >
bool read_or_write_setting ( ::game ctx,
hash::fnv1a32_t  key,
T &  value 
)

Reads a setting if found, inserts a setting if not found, and overwrites a setting if a type mismatch occurs.

Template Parameters
TSetting value type.
Parameters
[in]ctxGame context.
[in]keySetting key.
[in,out]Settingvalue.
Returns
true if the setting was read, false if the setting was written.

Definition at line 39 of file settings.hpp.