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

OptStringList is an option containing a list of strings.

#include <options.h>

Inheritance diagram for gurls::OptStringList:
Collaboration diagram for gurls::OptStringList:

List of all members.

Public Types

typedef std::vector< std::string > ValueType

Public Member Functions

void add (const std::string str)
 Adds a string to the list.
void clear ()
 Removes all contents in the list.
virtual const std::type_info & getDataID ()
 Returns the identifier of the option type.
OptTypes getType () const
 Returns the option type.
const std::vector< std::string > & getValue () const
 Returns the vector of strings.
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.
OptStringListoperator<< (std::string &str)
 Adds a string to the list.
OptStringListoperator<< (const char *str)
 Adds a string to the list.
OptStringListoperator= (const OptStringList &other)
 Copies the option values from an existing OptStringList.
 OptStringList ()
 Empty constructor.
 OptStringList (const std::vector< std::string > &vec)
 Constructor from a vector of strings.
 OptStringList (std::string &str)
 Constructor from a string, builds a 1-size vector of strings.
void setValue (const std::vector< std::string > newvalue)
 Copies the opt values from a vector of strings.
 ~OptStringList ()
 Destructor.

Static Public Member Functions

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

Protected Attributes

OptTypes type
 Option type.
std::vector< std::string > * value
 Vector of strings 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 232 of file options.h.


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