ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Prefs Class Reference

#include <prefs.h>

Public Types

enum  PrefsArray { paKey = 0, paValue = 1 }
 

Public Member Functions

 Prefs (bool autowrite=true, bool writealways=true)
 
 ~Prefs ()
 
bool read ()
 
bool write ()
 
bool set (const std::string &key, const std::string &value)
 
bool set (const std::string &key, int value)
 
bool set (const std::string &key, bool value)
 
std::string getStr (const std::string &key) const
 
std::string getPath (const std::string &key) const
 
int getNum (const std::string &key) const
 
bool getBool (const std::string &key) const
 

Static Public Member Functions

static char delim ()
 

Private Attributes

bool mAutoWrite
 
bool mWriteAlways
 
bool mRead
 
std::string mFilename
 
std::string mNothing
 
std::array< std::pair< std::string, std::string >, 23 > mPrefs
 

Detailed Description

Author
Fred Klaus

Member Enumeration Documentation

enum PrefsArray
Enumerator
paKey 
paValue 

Constructor & Destructor Documentation

Prefs ( bool  autowrite = true,
bool  writealways = true 
)
~Prefs ( )

References mAutoWrite, and write().

Member Function Documentation

static char delim ( )
inlinestatic

Referenced by getPath(), mainloop(), and Prefs().

bool getBool ( const std::string &  key) const

References mPrefs, and PREFCOUNT.

Referenced by init(), and set().

int getNum ( const std::string &  key) const

References mPrefs, and PREFCOUNT.

std::string getPath ( const std::string &  key) const

References delim(), getStr(), mNothing, and NAME_MAX.

Referenced by init(), initGui(), and mainloop().

std::string getStr ( const std::string &  key) const

References mNothing, mPrefs, and PREFCOUNT.

Referenced by getPath().

bool read ( )

References DOUT, mFilename, mPrefs, PREFCOUNT, and write().

Referenced by Prefs().

bool set ( const std::string &  key,
const std::string &  value 
)

References mPrefs, mWriteAlways, PREFCOUNT, and write().

Referenced by mainloop().

bool set ( const std::string &  key,
int  value 
)

References mPrefs, mWriteAlways, n, PREFCOUNT, and write().

bool set ( const std::string &  key,
bool  value 
)
bool write ( )

References DOUT, mFilename, mPrefs, and PREFCOUNT.

Referenced by read(), set(), and ~Prefs().

Member Data Documentation

bool mAutoWrite
private

Referenced by Prefs(), and ~Prefs().

std::string mFilename
private

Referenced by Prefs(), read(), and write().

std::string mNothing
private

Referenced by getPath(), getStr(), and Prefs().

std::array<std::pair<std::string, std::string>, 23 > mPrefs
private
bool mRead
private
bool mWriteAlways
private

Referenced by Prefs(), and set().


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