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

DC_SettableDataItem Class Reference

#include <DC_SettableDataItem.h>

Inheritance diagram for DC_SettableDataItem:

DC_DataItem List of all members.

Detailed Description

This class encapsulates a settable data item.

A settable data item is a data item that allows the encapsulated variable to be dynamically updated. Data items are used to set up permanent links between a component A that needs some input data and a component B that provides the input data. In such a situation, component A can be passed a data item that encapsulates access to the data from component B. Use of a settable data item (as opposed to an ordinary data item of the kind that is directly instantiated from DC_DataItem) is useful when it is desired to keep the option open of changing the input for component A. This can be done by changing the variable that is encapsulated in the data item that A uses as the source for its input.

Todo:
create a test case for this class
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 34 of file DC_SettableDataItem.h.

Public Member Functions

 DC_SettableDataItem (TD_Integer *d)
 Instantiate a settable data item component that encapsulates an integer-valued variable.

 DC_SettableDataItem (TD_Float *d)
 Instantiate a settable data item component that encapsulates a real-valued variable.

void setVariable (TD_Integer *pNewVar)
 Set a new integer-valued variable as the variable that is encapsulated by the data item.

void setVariable (TD_Float *pNewVar)
 Set a new real-valued variable as the variable that is encapsulated by the data item.


Constructor & Destructor Documentation

DC_SettableDataItem::DC_SettableDataItem TD_Integer d  )  [inline]
 

Instantiate a settable data item component that encapsulates an integer-valued variable.

This constructor simply calls the constructor of the super class.

Parameters:
d reference to the variable encapsulated by the data item

Definition at line 15 of file DC_SettableDataItem_inl.h.

DC_SettableDataItem::DC_SettableDataItem TD_Float d  )  [inline]
 

Instantiate a settable data item component that encapsulates a real-valued variable.

This constructor simply calls the constructor of the super class.

Parameters:
d reference to the variable encapsulated by the data item

Definition at line 18 of file DC_SettableDataItem_inl.h.


Member Function Documentation

void DC_SettableDataItem::setVariable TD_Float pNewVar  )  [inline]
 

Set a new real-valued variable as the variable that is encapsulated by the data item.

Parameters:
pNewVar the new variable encapsulated in the data item

Definition at line 25 of file DC_SettableDataItem_inl.h.

void DC_SettableDataItem::setVariable TD_Integer pNewVar  )  [inline]
 

Set a new integer-valued variable as the variable that is encapsulated by the data item.

Parameters:
pNewVar the new variable encapsulated in the data item

Definition at line 21 of file DC_SettableDataItem_inl.h.


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