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

OptFunction is an option representing a pointer to a generic function T (*function)(T* , int) operating over an array of floating point numbers.

#include <optfunction.h>

Inheritance diagram for gurls::OptFunction:
Collaboration diagram for gurls::OptFunction:

List of all members.

Public Member Functions

virtual const std::type_info & getDataID ()
 Returns the identifier of the option type.
std::string getName () const
 Returns the function name.
OptTypes getType () const
 Returns the option type.
template<typename T >
getValue (T *array, int n) const
 Executes the function over a buffer of length n, returning the result.
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.
OptFunctionoperator= (const OptFunction &other)
 Copies the option values from an existing OptFunction.
 OptFunction ()
 Empty constructor.
 OptFunction (std::string func_name)
 Constructor from a fuction name.
 ~OptFunction ()
 Destructor.

Static Public Member Functions

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

Protected Member Functions

void setValue (std::string func_name)
 Sets the option value from a string representing a supported function name.

Protected Attributes

Functorf
 Pointer to the functor containing the function to be called.
std::string name
 Function name.
OptTypes type
 Option type.

Friends

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

Detailed Description

Definition at line 170 of file optfunction.h.


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