GURLS++  2.0.00
C++ Implementation of GURLS Matlab Toolbox
gurls::OptString Class Reference

OptString is an option containing a generic string.

#include <options.h>

Inheritance diagram for gurls::OptString:
Collaboration diagram for gurls::OptString:

List of all members.

Public Types

typedef std::string ValueType

Public Member Functions

virtual const std::type_info & getDataID ()
 Returns the identifier of the option type.
OptTypes getType () const
 Returns the option type.
std::string & getValue ()
 Returns the string value.
const std::string & getValue () const
 Returns the string value.
virtual bool isA (OptTypes id) const
 Checks if the option has the given type.
virtual std::ostream & operator<< (std::ostream &os) const
 Writes the option to a stream.
OptStringoperator= (const OptString &other)
 Copies the opt values from an existing OptString.
OptStringoperator= (const std::string &other)
 Copies the string value of the option from an existing string.
 OptString ()
 Empty constructor.
 OptString (const std::string &str)
 Constructor from a char buffer.
 OptString (const std::wstring &str)
 Constructor from a wstring.
void setValue (const std::string &newvalue)
 Copies the string value of the option from an existing string.
 ~OptString ()
 Destructor.

Static Public Member Functions

static OptStringdynacast (GurlsOption *opt)
 Tries to cast a pointer to a generic option to a pointer to an OptString.
static const OptStringdynacast (const GurlsOption *opt)
 Tries to cast a pointer to a generic option to a pointer to an OptString.

Protected Attributes

OptTypes type
 Option type.
std::string value
 String containing the option value.

Friends

GURLS_EXPORT std::ostream & operator<< (std::ostream &os, const GurlsOption &opt)
 Writes an option to a stream.

Detailed Description

Definition at line 142 of file options.h.


Constructor & Destructor Documentation

gurls::OptString::OptString ( const std::string &  str)

Constructor from a string

Definition at line 451 of file options.cpp.

: GurlsOption(StringOption),value(str){}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends