Alida-C++ 0.1

DemoOperator Class Reference

Simple demo operator. More...

#include <DemoOperator.h>

Inheritance diagram for DemoOperator:
Collaboration diagram for DemoOperator:

List of all members.

Public Member Functions

 DemoOperator ()
 Default constructor.
virtual ~DemoOperator ()
 Default destructor.
void operate ()
 Method to implement the operator's functionality.
void validateCustom ()
 Operator specific validation of parameters.

Detailed Description

Simple demo operator.

This operator class just demonstrates the built-in functionality of Alida. It declares parameters of several native data types, however, does not perform any serious manipulations on the data.

Definition at line 51 of file DemoOperator.h.


Constructor & Destructor Documentation

DemoOperator::DemoOperator ( )

Default constructor.

The constructor of an operator is supposed to take care of proper parameter registration. Using the macro DEFINE_PARAMETER defined in the file of class ALDOperator each parameter that should be visible from outside needs to be declared.

For this operator as a toy example four input parameters of native data types are defined and one output parameter of type double.
Note that each parameter definition is supposed to provide information about

  • the parameter's data type
  • its name
  • the parameter direction
  • whether it is required or not
  • whether it is supplemental or not
  • a label (e.g., to be used in GUIs)
  • an explanation
  • an optional default value

Definition at line 72 of file DemoOperator.cc.

References DEFINE_PARAMETER, Alida::PARAMETER_IN, and Alida::PARAMETER_OUT.

virtual DemoOperator::~DemoOperator ( ) [inline, virtual]

Default destructor.

Definition at line 59 of file DemoOperator.h.


Member Function Documentation

void DemoOperator::operate ( ) [virtual]

Method to implement the operator's functionality.

This function implements its abstract counterpart from the operator base class and contains the functional core of this operator.
In this specific example the function does nothing reasonable, but just demonstrates how to access defined input parameters, and how to correctly fill the operator's output parameters.

Implements Alida::ALDOperator.

Definition at line 98 of file DemoOperator.cc.

void DemoOperator::validateCustom ( ) [virtual]

Operator specific validation of parameters.

Demonstrate custom validation, just require floatval to be non-negativ

Reimplemented from Alida::ALDOperator.

Definition at line 121 of file DemoOperator.cc.


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