An object that maintains the context for the executing code. More...
#include <Context.h>
Public Member Functions | |
int | get_int (string key) |
Get an integer valued property named key. | |
string | get_string (string key) |
Get a string valued property named key. | |
double | get_double (string key) |
Get a double valued property named key. | |
bool | get_bool (string key) |
Get a bool valued property named key. | |
void | put_string (string key, string val) |
Static Public Member Functions | |
static Context & | get_instance () |
An object that maintains the context for the executing code.
This is a Singleton object that maintains a context for the executing code. It contains a list of properties stored as a key-value map
All the flags defined are made available through this object. It can also be used as a mechanism for message passing. This reduces coupling between the code and gflags.
bool Context::get_bool | ( | string | key | ) |
Get a bool valued property named key.
double Context::get_double | ( | string | key | ) |
Get a double valued property named key.
Context & Context::get_instance | ( | ) | [static] |
int Context::get_int | ( | string | key | ) |
Get an integer valued property named key.
string Context::get_string | ( | string | key | ) |
Get a string valued property named key.
void Context::put_string | ( | string | key, | |
string | val | |||
) |
Put a string value for property key into the map