DataDirector API
Public Member Functions | Protected Member Functions | List of all members
DDD_ConvertBase Class Referenceabstract

Abstract base class for all DDD_DataDirector converters. More...

#include <DDD_ConvertBase.h>

Inheritance diagram for DDD_ConvertBase:
DDD_Base DDD_AttributeContainer DDD_LogFacade DDD_ConvertAssign DDD_ConvertClamp DDD_ConvertConstant DDD_ConvertExpression DDD_ConvertFormat DDD_ConvertMean DDD_ConvertOffset DDD_ConvertScale

Public Member Functions

 DDD_ConvertBase ()
 
const char * DataDirectorVersion ()
 
virtual std::string EndpointInputName (int index)
 
virtual std::string EndpointOutputName (int index)
 
virtual bool Init (const std::string &paramStr)
 
virtual int MinInputs ()
 
virtual int MaxInputs ()
 
virtual int MinOutputs ()
 
virtual int MaxOutputs ()
 
virtual bool ConfigurationValid (DDD_EndpointList &inputs, DDD_EndpointList &outputs)
 
virtual bool Convert (DDD_EndpointList &inputs, DDD_EndpointList &outputs)=0
 
virtual const char * ClassName ()=0
 
virtual const char * Description ()=0
 
- Public Member Functions inherited from DDD_Base
 DDD_Base ()
 
virtual ~DDD_Base ()
 
const char * GetInstanceName () const
 
virtual void SetInstanceName (const char *name)
 
virtual void SetParams (const DDD_AttributeList &params)
 
virtual DDD_AttributeListGetParams ()
 

Protected Member Functions

bool InputsOK (int nInputs)
 
bool OutputsOK (int nOutputs)
 

Additional Inherited Members

- Static Public Member Functions inherited from DDD_LogFacade
static void LogDebug (const char *format,...)
 
static void LogInfo (const char *format,...)
 
static void LogWarning (const char *format,...)
 
static void LogError (const char *format,...)
 
- Protected Attributes inherited from DDD_Base
std::string _instanceName
 
DDD_AttributeList _params
 

Detailed Description

Abstract base class for all DDD_DataDirector converters.

Constructor & Destructor Documentation

Constructor

Member Function Documentation

virtual const char* ClassName ( )
pure virtual
virtual bool ConfigurationValid ( DDD_EndpointList inputs,
DDD_EndpointList outputs 
)
virtual
Returns
Returns true if the converter's configuration is valid
Parameters
inputsList of converter inputs
outputsList of converter outputs

Reimplemented in DDD_ConvertClamp, and DDD_ConvertExpression.

virtual bool Convert ( DDD_EndpointList inputs,
DDD_EndpointList outputs 
)
pure virtual

Performs the actual conversion function

Parameters
inputsA list of inputs to the converter
outputsA list of outputs to the converter
Returns
True if the converter fired.

Implemented in DDD_ConvertFormat, DDD_ConvertClamp, DDD_ConvertConstant, DDD_ConvertAssign, DDD_ConvertOffset, DDD_ConvertScale, DDD_ConvertMean, and DDD_ConvertExpression.

const char* DataDirectorVersion ( )
Returns
Returns string identifying which version of DataDirector this converter was built against
virtual const char* Description ( )
pure virtual

Used by the GUI to explain what this converter does

Returns
Returns a string for the GUI to use

Implemented in DDD_ConvertSubroutine, DDD_ConvertExpression, DDD_ConvertFormat, DDD_ConvertClamp, DDD_ConvertConstant, DDD_ConvertAssign, DDD_ConvertMean, DDD_ConvertOffset, and DDD_ConvertScale.

virtual std::string EndpointInputName ( int  index)
virtual

Returns a string label for the input index. Converters must provide named labels to differentiate between different inputs/outputs.

Parameters
indexThe index of the input
virtual std::string EndpointOutputName ( int  index)
virtual

Returns a string label for the output index. Converters must provide named labels to differentiate between different inputs/outputs.

Parameters
indexThe index of the output
virtual bool Init ( const std::string &  paramStr)
virtual

Initializes the converter, if necessary

Parameters
paramString
Returns
True if the converter was successfully initialized.

Reimplemented in DDD_ConvertSubroutine, DDD_ConvertExpression, DDD_ConvertAssign, DDD_ConvertClamp, DDD_ConvertConstant, and DDD_ConvertMean.

bool InputsOK ( int  nInputs)
protected

Checks that nInputs fall within the allowed number of inputs

Parameters
nInputsThe number of inputs
Returns
True if the number of inputs is valid
virtual int MaxInputs ( )
inlinevirtual
Returns
Returns the maximum number of inputs supported by this converter

Reimplemented in DDD_ConvertFormat, DDD_ConvertExpression, DDD_ConvertConstant, and DDD_ConvertMean.

virtual int MaxOutputs ( )
inlinevirtual
Returns
Returns the maximum number of outputs supported by this converter

Reimplemented in DDD_ConvertFormat, DDD_ConvertExpression, DDD_ConvertClamp, DDD_ConvertConstant, DDD_ConvertAssign, DDD_ConvertMean, DDD_ConvertOffset, and DDD_ConvertScale.

virtual int MinInputs ( )
inlinevirtual
Returns
Returns the minimum number of inputs required by this converter

Reimplemented in DDD_ConvertFormat, DDD_ConvertExpression, and DDD_ConvertConstant.

virtual int MinOutputs ( )
inlinevirtual
Returns
Returns the minimum number of outputs required by this converter

Reimplemented in DDD_ConvertFormat, and DDD_ConvertExpression.

bool OutputsOK ( int  nOutputs)
protected

Checks that nOutputs fall within the allowed number of outputs

Parameters
nOutputsThe number of outputs
Returns
True if the number of outputs is valid

The documentation for this class was generated from the following file: