Cortex 6.0.0
Public Member Functions | Protected Member Functions

IECore::Op Class Reference

#include <Op.h>

Inheritance diagram for IECore::Op:

List of all members.

Public Member Functions

 IE_CORE_DECLARERUNTIMETYPED (Op, Parameterised)
 Op (const std::string &description, ParameterPtr resultParameter)
 Op (const std::string &description, CompoundParameterPtr compoundParameter, ParameterPtr resultParameter)
ObjectPtr operate ()
const ParameterresultParameter () const

Protected Member Functions

virtual ObjectPtr doOperation (const CompoundObject *operands)=0

Detailed Description

The Op class defines a base class for objects which perform an operation based on some input parameters and returns a result derived from Object. Parameter objects are used to define both the format of the inputs and the result.


Constructor & Destructor Documentation

IECore::Op::Op ( const std::string &  description,
ParameterPtr  resultParameter 
)

Derived classes must pass a suitable resultParameter in their initialiser. Also, every non-abstract derived class from Op should provide a default constructor so that it's possible to extract the parameters from an unknown Op (method used in ClassLoader).

IECore::Op::Op ( const std::string &  description,
CompoundParameterPtr  compoundParameter,
ParameterPtr  resultParameter 
)

Alternative constructor for replacing the internal CompoundParameter object by another derived class from CompoundParameter.


Member Function Documentation

virtual ObjectPtr IECore::Op::doOperation ( const CompoundObject operands) [protected, pure virtual]
ObjectPtr IECore::Op::operate ( )

Performs the operation using the current values of parameters(). Throws an Exception if the parameter values are not valid.

const Parameter* IECore::Op::resultParameter ( ) const

Returns a parameter describing the result of the operation - the value of this parameter is always the value last returned by operate.


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