Classes | Public Member Functions | Public Attributes

graphlab::scheduler_options Class Reference

#include <scheduler_options.hpp>

List of all members.


struct  scheduler_option_values
 The internal storage of the scheduler options. More...

Public Member Functions

 scheduler_options (std::string &s)
void add_option_str (const std::string &opt, const std::string &val)
template<typename T >
< boost::is_function< T >
::value, void >::type 
add_option (const std::string &opt, const T &val)
template<typename T >
< boost::is_function< T >
::value, void >::type 
add_option (const std::string &opt, const T &val)
bool get_string_option (const std::string &opt, std::string &val) const
template<typename IntType >
bool get_int_option (const std::string &opt, IntType &val) const
template<typename FloatType >
bool get_float_option (const std::string &opt, FloatType &val) const
bool get_any_option (const std::string &opt, any &val) const
template<typename T >
void erase_option (const std::string &opt)
void apply_options (const scheduler_options &other)
void parse_options (const std::string &s)
void parse_options (std::istream &s)
std::string parse_scheduler_string (std::string scheduler_raw)

Public Attributes

std::map< std::string,

Detailed Description

Scheduler 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 scheduler_options class will invisibly cast between string, integer and double data types. For instance, if a scheduler expects a

Definition at line 39 of file scheduler_options.hpp.

Member Function Documentation

template<typename T >
boost::disable_if_c<boost::is_function<T>::value, void>::type graphlab::scheduler_options::add_option ( const std::string &  opt,
const T &  val 
) [inline]

Add an option -> value pair where value is a string. There are two version of this function implemented since The any cannot store functions, but only function pointers, we need to be able to differentiate between them

Definition at line 68 of file scheduler_options.hpp.

void graphlab::scheduler_options::add_option_str ( const std::string &  opt,
const std::string &  val 
) [inline]

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

Definition at line 52 of file scheduler_options.hpp.

void graphlab::scheduler_options::apply_options ( const scheduler_options other  )  [inline]

Combines two scheduler options. Warns if options intersects

Definition at line 159 of file scheduler_options.hpp.

template<typename T >
void graphlab::scheduler_options::erase_option ( const std::string &  opt  )  [inline]

Erases an option

Definition at line 152 of file scheduler_options.hpp.

bool graphlab::scheduler_options::get_any_option ( const std::string &  opt,
any val 
) const [inline]

Reads an any option

Definition at line 140 of file scheduler_options.hpp.

template<typename FloatType >
bool graphlab::scheduler_options::get_float_option ( const std::string &  opt,
FloatType &  val 
) const [inline]

Reads a float option

Definition at line 128 of file scheduler_options.hpp.

template<typename IntType >
bool graphlab::scheduler_options::get_int_option ( const std::string &  opt,
IntType &  val 
) const [inline]

Reads a integer option

Definition at line 115 of file scheduler_options.hpp.

bool graphlab::scheduler_options::get_string_option ( const std::string &  opt,
std::string &  val 
) const [inline]

Reads a string option

Definition at line 102 of file scheduler_options.hpp.

void graphlab::scheduler_options::parse_options ( std::istream &  s  )  [inline]

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

Definition at line 196 of file scheduler_options.hpp.

void graphlab::scheduler_options::parse_options ( const std::string &  s  )  [inline]

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

Definition at line 187 of file scheduler_options.hpp.

std::string graphlab::scheduler_options::parse_scheduler_string ( std::string  scheduler_raw  ) 

Parse the scheduler string returning the scheduler and storing all the options.

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