Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

PointerControlBlock Class Reference
[Data Processing]

#include <PointerControlBlock.h>

Inheritance diagram for PointerControlBlock:

ControlBlock CC_RootObject DC_DummyPointerControlBlock DC_MatlabPointerPID List of all members.

Detailed Description

Base class for pointer control blocks.

A pointer control block is a control block that is linked to its inputs and outputs through pointers. It adds to its ControlBlock base class the following attributes:<ul> The input pointers: the pointers to the external locations from which the input values are loaded. The output pointers: the pointers to the external locations to which the output values are written. This class adds services to set up the link between the block inputs and outputs and the external locations from which the inputs are read and to which the outputs are written.

This class deviates from the project-specific coding rule PR3.1. Use of pointers to a variable of primitive type is necessary to fulfill the function of the class.

Author:
Alessandro Pasetti (P&P Software GmbH)

Roberto Totaro

Version:
1.0

Definition at line 38 of file PointerControlBlock.h.

Public Member Functions

 PointerControlBlock (void)
 Instantiate a pointer control block.

void setInputLink (unsigned int i, TD_Float *pInput)
 Set the i-th input pointer.

void setOutputLink (unsigned int i, TD_Float *pOutput)
 Set the i-th output pointer.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on a pointer control block.


Protected Member Functions

virtual void setNumberOfInputs (unsigned int n)
 Set the number of inputs.

virtual void setNumberOfOutputs (unsigned int n)
 Set the number of outputs.


Protected Attributes

TD_Float ** pU
 Array of input pointers.

TD_Float ** pY
 Array of output pointers.


Constructor & Destructor Documentation

PointerControlBlock::PointerControlBlock void   ) 
 

Instantiate a pointer control block.

The input pointers and output pointers are initialized to illegal values to signify that the component is not yet configured.

Definition at line 20 of file PointerControlBlock.cpp.


Member Function Documentation

bool PointerControlBlock::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on a pointer control block.

It is checked that the input and output pointers have been loaded.

Reimplemented from ControlBlock.

Definition at line 63 of file PointerControlBlock.cpp.

void PointerControlBlock::setInputLink unsigned int  i,
TD_Float pInput
 

Set the i-th input pointer.

This method sets the pointer to the location from which the the i-th input should be read. The argument i must lie in the interval [0,n-1] where n is the number of inputs. Illegal argument values trigger the generation of an event report EVT_ILLEGAL_CB.

Parameters:
i the index of the input
pInput the pointer to the external input location

Definition at line 45 of file PointerControlBlock.cpp.

void PointerControlBlock::setNumberOfInputs unsigned int  n  )  [protected, virtual]
 

Set the number of inputs.

This method causes the memory for the array holding the input pointers to be allocated. This is an initialization method: it shall be called only once.

Parameters:
n the number of inputs

Implements ControlBlock.

Definition at line 25 of file PointerControlBlock.cpp.

void PointerControlBlock::setNumberOfOutputs unsigned int  n  )  [protected, virtual]
 

Set the number of outputs.

This method causes the memory for the array holding the output pointers to be allocated. This is an initialization method: it shall be called only once.

Parameters:
n the number of outputs

Implements ControlBlock.

Definition at line 35 of file PointerControlBlock.cpp.

void PointerControlBlock::setOutputLink unsigned int  i,
TD_Float pOutput
 

Set the i-th output pointer.

This method sets the pointer to the location to which the the i-th output should be written. The argument i must lie in the interval [0,n-1] where n is the number of outputs. Illegal argument values trigger the generation of an event report EVT_ILLEGAL_CB.

Parameters:
i the index of the output
pOutput the pointer to the external output location

Definition at line 54 of file PointerControlBlock.cpp.


Member Data Documentation

TD_Float** PointerControlBlock::pU [protected]
 

Array of input pointers.

pU[i] holds the pointer to the i-th input variable with i lying in the interval [0,N-1] where N is the number of inputs.

See also:
setInputLink

Definition at line 46 of file PointerControlBlock.h.

TD_Float** PointerControlBlock::pY [protected]
 

Array of output pointers.

pY[i] holds the pointer to the i-th output variable with i lying in the interval [0,N-1] where N is the number of outputs.

See also:
setOutputLink

Definition at line 54 of file PointerControlBlock.h.


The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved