ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
parameters::conversion::get_< std::vector< T > > Struct Template Reference

#include <parameter_proxy.h>

Public Member Functions

std::vector< T > operator() (std::string const &val)
 

Detailed Description

template<class T>
struct parameters::conversion::get_< std::vector< T > >

Definition at line 65 of file parameter_proxy.h.

Member Function Documentation

template<class T >
std::vector<T> parameters::conversion::get_< std::vector< T > >::operator() ( std::string const &  val)
inline

Definition at line 67 of file parameter_proxy.h.

68  {
69  std::string raw = val;
70  boost::trim_if(raw, boost::is_any_of("\"'"));
71  std::vector<T> ret;
72 
73  typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
74  boost::char_separator<char> sep(",");
75  tokenizer tokens(raw, sep);
76  BOOST_FOREACH(std::string t, tokens) {
77  ret.push_back(boost::lexical_cast<T, std::string>(t));
78  }
79  return ret;
80  }

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