GURLS++  2.0.00
C++ Implementation of GURLS Matlab Toolbox
gurls::OptMatrix< Matrix > Class Template Reference

OptMatrix is an option containing a matrix. More...

#include <optmatrix.h>

Inheritance diagram for gurls::OptMatrix< Matrix >:
Collaboration diagram for gurls::OptMatrix< Matrix >:

List of all members.

Public Types

enum  MatrixType { FLOAT, DOUBLE, ULONG }
 Enumeration containing all supported element types.
typedef Matrix ValueType

Public Member Functions

void detachValue ()
 Remove ownership for matrix pointer.
virtual const std::type_info & getDataID ()
 Returns the identifier of the option type.
MatrixType getMatrixType () const
 Returns the element type for the matrix.
OptTypes getType () const
 Returns the option type.
Matrix & getValue ()
 Returns the matrix.
const Matrix & getValue () const
 Returns the matrix.
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.
OptMatrix< Matrix > & operator= (const OptMatrix< Matrix > &other)
 Copies the option values from an existing OptMatrix.
OptMatrixoperator= (const Matrix &other)
 Copies the matrix from an existing matrix.
 OptMatrix ()
 Empty constructor.
 OptMatrix (Matrix &m, bool owner=true)
 Constructor from an existing matrix.
void setValue (const Matrix &newvalue)
 Copies the matrix from an existing matrix.
 ~OptMatrix ()
 Destructor.

Static Public Member Functions

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

Protected Attributes

MatrixType matType
 Stores the type of the elements inside the matrix.
OptTypes type
 Option type.

Private Attributes

bool isOwner
 Flag indicating if the option is owner of the matrix pointer.
Matrix * value
 Option value.

Friends

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

Detailed Description

template<typename Matrix>
class gurls::OptMatrix< Matrix >

Template Parameters:
MatrixTypeType of the matrix contained into the option

Definition at line 136 of file optmatrix.h.


Member Function Documentation

template<typename T >
std::ostream & gurls::OptMatrix< T >::operator<< ( std::ostream &  os) const [virtual]

Writes an OptMatrix to a stream.

Implements gurls::GurlsOption.

Definition at line 287 of file optmatrix.h.

{
    return os << std::endl << this->getValue();
}

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