Class kwargs (o2scl)

O2scl : Class List

class kwargs

Keyword argument class.

Public Functions

kwargs(std::string s = "")

Create an objection from the specified string.

void set(std::string s)

Set the object from the specified string.

bool get_bool(std::string name, bool def = false)

Get a bool variable named name.

int get_int(std::string name, int def = 0)

Get an integer variable named name.

size_t get_size_t(std::string name, size_t def = 0)

Get a size_t variable named name.

double get_double(std::string name, double def = 0.0)

Get a double variable named name.

std::string get_string(std::string name, std::string def = "")

Get a string variable named name.

bool is_set(std::string name)

Return true if name is found.

void summary(std::ostream &out) const

Output a summary to the screen.

Private Members

std::map<std::string, std::string> k

Store the original string variables and values.