|
CEBL
2.1
|
#include <Session.hpp>
Public Member Functions | |
| Session () | |
| ~Session () | |
| Session (const Session &) | |
| void | load (const char *filename) |
| Load session from session file. | |
| void | save (const char *filename) |
| Save session to session file. | |
| void | save () |
| Save session to current session file. | |
| bool | shouldSaveAs () |
| Should the user be prompted to save as. | |
| template<typename T > | |
| void | add (std::string param, const T &value, std::string section="") |
| Add any type param to the session. | |
| template<typename T > | |
| void | add (const char *param, const T &value, std::string section="") |
| Add any type param to the session. | |
| template<typename T > | |
| Session & | operator() (std::string param, const T &value) |
| easy access to add | |
| template<typename T > | |
| Session & | operator() (const char *param, const T &value) |
| easy access to add | |
| void | clear () |
| Clear contents. | |
| void | setCurrentSection (std::string sc) |
| Set current section so it doesn't have to be specified every time. | |
| bool | exists (std::string param, std::string section="") |
| Check if a value exists. | |
| template<typename T > | |
| T | get (std::string param, std::string section="") |
| get parameter | |
| template<typename T > | |
| void | get (std::string param, T *v, std::string section="") |
| get into given variable | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Session &s1) |
| Send to ostream. | |
Definition at line 39 of file Session.hpp.
| Session::Session | ( | ) |
Definition at line 25 of file Session.cpp.
| Session::~Session | ( | ) |
Definition at line 32 of file Session.cpp.
| Session::Session | ( | const Session & | s2 | ) |
Definition at line 36 of file Session.cpp.
|
inline |
Add any type param to the session.
Definition at line 72 of file Session.hpp.
|
inline |
Add any type param to the session.
Definition at line 84 of file Session.hpp.
|
inline |
Clear contents.
Definition at line 106 of file Session.hpp.
| bool Session::exists | ( | std::string | param, |
| std::string | section = "" |
||
| ) |
|
inline |
get parameter
Definition at line 121 of file Session.hpp.
|
inline |
get into given variable
Definition at line 136 of file Session.hpp.
| void Session::load | ( | const char * | filename | ) |
Load session from session file.
Definition at line 49 of file Session.cpp.
Referenced by SessionManager::load().
|
inline |
easy access to add
Definition at line 91 of file Session.hpp.
|
inline |
easy access to add
Definition at line 99 of file Session.hpp.
| void Session::save | ( | const char * | filename | ) |
Save session to session file.
Definition at line 118 of file Session.cpp.
Referenced by SessionManager::save(), and SessionManager::saveAs().
| void Session::save | ( | ) |
Save session to current session file.
Save to file already saved to once before.
Definition at line 137 of file Session.cpp.
References boost::serialization::save().
|
inline |
Set current section so it doesn't have to be specified every time.
Definition at line 114 of file Session.hpp.
| bool Session::shouldSaveAs | ( | ) |
Should the user be prompted to save as.
Should the user specify where to save?
Definition at line 143 of file Session.cpp.
Referenced by SessionManager::shouldSaveAs().
|
friend |
Send to ostream.
Definition at line 149 of file Session.cpp.
1.8.1.1