namespace alps { class StringValue { public: StringValue(); StringValue(const std::string&); StringValue(const char*); template <class T> StringValue(const T& x); const StringValue& operator=(const std::string& x); const StringValue& operator=(const char* x); template <class T> const StringValue& operator=(const T& x); bool operator==(const StringValue&) const; bool operator!=(const StringValue&) const; operator std::string (); operator bool() const; template <class T> operator T() const; template <class T> T get() const; const char* c_str() const; }; std::ostream& operator <<(std::ostream& os, const palm::StringValue& v); std::istream& operator >>(std::istream& is, palm::StringValue& v); }
initialized to an empty string.StringValue();
initializes from a std::string.StringValue( const std::string& x);
initializes from a C-style string.StringValue( const char* x);
initialize from any other type by converting to a std::string using lexical_cast.template <class T> StringValue(const T& x);
assigns from a std::string.StringValue& operator=(const std::string& x);
assigns from a C-style string.StringValue& operator=(const char* x);
assign any other type by converting to a std::string using lexical_cast.template <class T> const StringValue& operator=(const T& x);
The comparison operators compare the string representation.bool operator==(const StringValue&) const; bool operator!=(const StringValue&) const;
return the string representationoperator std::string () const;
return a representation as C-style string.const char* c_str() const;
template <class T> T get() const;
converts the underlying string to type T using boost::lexical_cast. Conversion to bool also interprets the strings true and false as boolean values.operator bool() const; template <class T> operator T() const; template <class T> T get() const ;
writes the stored string to an ostream.std::ostream& operator <<(std::ostream& os, const palm::StringValue& v);
reads a std::string from the stream and stores it in v.std::istream& operator >>(std::istream& is, palm::StringValue& v);
copyright (c) 1994-2010 by Matthias Troyer
Distributed under the Boost Software License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)