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

DC_RawDataItem Class Reference

#include <DC_RawDataItem.h>

Inheritance diagram for DC_RawDataItem:

DC_DataItem List of all members.

Detailed Description

This class encapsulates a raw data item.

A raw data item is a data item that encapsulates a "raw pointer", namely a pointer that does not have a specific type and is defined simply as a "pointer to void". The raw data item offers accessors methods that allow its underlying variable to be accessed as a variable of the following types: unsigned int, int, unsigned short, short, unsigned char, char, float, and double. The raw data item therefore essentially allows cast to be performed between types in a controlled manner. This is useful when manipulating registers or other low-level variables.

Author:
Alessandro Pasetti (P&P Software GmbH)

Roberto Totaro

Version:
2.0

Definition at line 33 of file DC_RawDataItem.h.

Public Member Functions

 DC_RawDataItem (void *d)
 Instantiate a raw data item component.

char getChar (void) const
 Return the value of the data item intepreted as a variable of type char.

void setChar (char newValue)
 Set the value of the data item intepreted as a variable of type char.

unsigned char getUnsignedChar (void) const
 Return the value of the data item intepreted as a variable of type unsigned char.

void setUnsignedChar (unsigned char newValue)
 Set the value of the data item intepreted as a variable of type unsigned char.

short getShort (void) const
 Return the value of the data item intepreted as a variable of type short.

void setShort (short newValue)
 Set the value of the data item intepreted as a variable of type short.

unsigned short getUnsignedShort (void) const
 Return the value of the data item intepreted as a variable of type unsigned short.

void setUnsignedShort (unsigned short newValue)
 Set the value of the data item intepreted as a variable of type unsigned short.

int getInt (void) const
 Return the value of the data item intepreted as a variable of type int.

void setInt (int newValue)
 Set the value of the data item intepreted as a variable of type int.

unsigned int getUnsignedInt (void) const
 Return the value of the data item intepreted as a variable of type unsigned int.

void setUnsignedInt (unsigned int newValue)
 Set the value of the data item intepreted as a variable of type unsigned int.

float getFloat (void) const
 Return the value of the data item intepreted as a variable of type float.

void setFloat (float newValue)
 Set the value of the data item intepreted as a variable of type float.

double getDouble (void) const
 Return the value of the data item intepreted as a variable of type double.

void setDouble (double newValue)
 Set the value of the data item intepreted as a variable of type double.


Constructor & Destructor Documentation

DC_RawDataItem::DC_RawDataItem void *  d  )  [inline]
 

Instantiate a raw data item component.

This constructor simply calls the constructor of the super class and passes its argument to it as shown in the following pseudocode:<PRE> DC_DataItem((TD_Integer*)d); The cast to the type "pointer to TD_Integer" is arbitrary and only serves to select one of the two constructors defined in the superclass.

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

Definition at line 16 of file DC_RawDataItem_inl.h.


Member Function Documentation

char DC_RawDataItem::getChar void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type char.

The pointer that is encapsulated by the data item is interpreted as a pointer to type char and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 19 of file DC_RawDataItem_inl.h.

double DC_RawDataItem::getDouble void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type double.

The pointer that is encapsulated by the data item is interpreted as a pointer to type double and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 47 of file DC_RawDataItem_inl.h.

float DC_RawDataItem::getFloat void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type float.

The pointer that is encapsulated by the data item is interpreted as a pointer to type float and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 43 of file DC_RawDataItem_inl.h.

int DC_RawDataItem::getInt void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type int.

The pointer that is encapsulated by the data item is interpreted as a pointer to type int and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 35 of file DC_RawDataItem_inl.h.

short DC_RawDataItem::getShort void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type short.

The pointer that is encapsulated by the data item is interpreted as a pointer to type short and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 27 of file DC_RawDataItem_inl.h.

unsigned char DC_RawDataItem::getUnsignedChar void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type unsigned char.

The pointer that is encapsulated by the data item is interpreted as a pointer to type unsigned char and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 23 of file DC_RawDataItem_inl.h.

unsigned int DC_RawDataItem::getUnsignedInt void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type unsigned int.

The pointer that is encapsulated by the data item is interpreted as a pointer to type unsigned int and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 39 of file DC_RawDataItem_inl.h.

unsigned short DC_RawDataItem::getUnsignedShort void   )  const [inline]
 

Return the value of the data item intepreted as a variable of type unsigned short.

The pointer that is encapsulated by the data item is interpreted as a pointer to type unsigned short and its dereferenced value is returned.

Returns:
the value of the variable encapsulated in the data item

Definition at line 31 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setChar char  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type char.

The pointer that is encapsulated by the data item is interpreted as a pointer to type char.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 51 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setDouble double  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type double.

The pointer that is encapsulated by the data item is interpreted as a pointer to type double.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 79 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setFloat float  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type float.

The pointer that is encapsulated by the data item is interpreted as a pointer to type float.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 75 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setInt int  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type int.

The pointer that is encapsulated by the data item is interpreted as a pointer to type int.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 67 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setShort short  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type short.

The pointer that is encapsulated by the data item is interpreted as a pointer to type short.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 59 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setUnsignedChar unsigned char  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type unsigned char.

The pointer that is encapsulated by the data item is interpreted as a pointer to type unsigned char.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 55 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setUnsignedInt unsigned int  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type unsigned int.

The pointer that is encapsulated by the data item is interpreted as a pointer to type unsigned int.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 71 of file DC_RawDataItem_inl.h.

void DC_RawDataItem::setUnsignedShort unsigned short  newValue  )  [inline]
 

Set the value of the data item intepreted as a variable of type unsigned short.

The pointer that is encapsulated by the data item is interpreted as a pointer to type unsigned short.

Parameters:
newValue the new value of the variable encapsulated in the data item

Definition at line 63 of file DC_RawDataItem_inl.h.


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