GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
graphlab::options_map Class Reference

#include <graphlab/options/options_map.hpp>

List of all members.

Classes

struct  option_values
 The internal storage of the options. More...

Public Member Functions

 options_map (std::string &s)
void set_option_str (const std::string &opt, const std::string &val)
template<typename T >
void set_option (const std::string &opt, const T &val)
bool is_set (const std::string &opt) const
bool get_option (const std::string &opt, std::string &val) const
bool get_option (const std::string &opt, bool &val) const
template<typename IntType >
bool get_option (const std::string &opt, IntType &val) const
bool get_option (const std::string &opt, float &val) const
bool get_option (const std::string &opt, double &val) const
void erase_option (const std::string &opt)
void clear_options ()
bool parse_options (std::istream &s)
std::vector< std::string > get_option_keys () const
void parse_string (std::string arguments)

Public Attributes

std::map< std::string,
option_values
options

Detailed Description

options data structure. Defines a collection of key->value pairs where the key is a string, and the value is an arbitrary data type. The options_map class will invisibly cast between string, integer and double data types.

Definition at line 52 of file options_map.hpp.


Member Function Documentation

void graphlab::options_map::clear_options ( )
inline

Clears all options

Definition at line 162 of file options_map.hpp.

void graphlab::options_map::erase_option ( const std::string &  opt)
inline

Erases an option

Definition at line 155 of file options_map.hpp.

bool graphlab::options_map::get_option ( const std::string &  opt,
std::string &  val 
) const
inline

Reads a string option

Definition at line 102 of file options_map.hpp.

bool graphlab::options_map::get_option ( const std::string &  opt,
bool &  val 
) const
inline

Reads a string option

Definition at line 112 of file options_map.hpp.

template<typename IntType >
bool graphlab::options_map::get_option ( const std::string &  opt,
IntType &  val 
) const
inline

Reads a integer option

Definition at line 124 of file options_map.hpp.

bool graphlab::options_map::get_option ( const std::string &  opt,
float &  val 
) const
inline

Reads a float option

Definition at line 134 of file options_map.hpp.

bool graphlab::options_map::get_option ( const std::string &  opt,
double &  val 
) const
inline

Reads a double option

Definition at line 144 of file options_map.hpp.

bool graphlab::options_map::is_set ( const std::string &  opt) const
inline

Test if the option has been created

Definition at line 94 of file options_map.hpp.

bool graphlab::options_map::parse_options ( std::istream &  s)
inline

Parses an option stream of the form "a=b c=d ..."

Definition at line 170 of file options_map.hpp.

void graphlab::options_map::parse_string ( std::string  arguments)

Parse a comma delimited series of key1=value1,key2=value2

Definition at line 44 of file options_map.cpp.

void graphlab::options_map::set_option_str ( const std::string &  opt,
const std::string &  val 
)
inline

Add an option -> value pair where value is a string. Don't use. set_option() prefered.

Definition at line 65 of file options_map.hpp.


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