ConfigFile::read (type)

From King Arthur's Gold Wiki
Jump to: navigation, search

Returns a value of a particular type for the given key, if it currently exists in the ConfigFile. The type is specified by the specific method name used.


You can optionally specify a default value to be returned via the second parameter. You should either check if the desired key exists before reading it or specify a default.

f32 read_f32( const string &in key )
f32 read_f32( const string &in key, const f32 &in value )
u8 read_u8( const string &in key )
u8 read_u8( const string &in key, const u8 &in value )
s8 read_s8( const string &in key )
s8 read_s8( const string &in key, const s8 &in value )
u16 read_u16( const string &in key )
u16 read_u16( const string &in key, const u16 &in value )
s16 read_s16( const string &in key )
s16 read_s16( const string &in key, const s16 &in value )
u32 read_u32( const string &in key )
u32 read_u32( const string &in key, const u32 &in value )
s32 read_s32( const string &in key )
s32 read_s32( const string &in key, const s32 &in value )
bool read_bool( const string &in key )
bool read_bool( const string &in key, const bool &in value )
string read_string( const string &in key )
string read_string( const string &in key, const string &in value )

Object method of: ConfigFile