Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

gov::cca::RawData Class Reference

A low-level interface for accessing memory. More...

#include <RawData.h>

Inheritance diagram for gov::cca::RawData:

Inheritance graph
[legend]
Collaboration diagram for gov::cca::RawData:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Type {
  Err = 0, Byte = 1, Bool = 2, Char = 3,
  WChar = 4, Int1 = 5, Int2 = 6, Int4 = 7,
  Int8 = 8, UInt1 = 9, UInt2 = 10, UInt4 = 11,
  UInt8 = 12, Float4 = 13, Float8 = 14, Float16 = 15,
  Complex4 = 16, Complex8 = 17, Complex16 = 18, Complex32 = 19,
  PtrByte = 65, PtrBool = 66, PtrChar = 67, PtrWChar = 68,
  PtrInt1 = 69, PtrInt2 = 70, PtrInt4 = 71, PtrInt8 = 72,
  PtrUInt1 = 73, PtrUInt2 = 74, PtrUInt4 = 75, PtrUInt8 = 76,
  PtrFloat4 = 77, PtrFloat8 = 78, PtrFloat16 = 79, PtrComplex4 = 80,
  PtrComplex8 = 81, PtrComplex16 = 82, PtrComplex32 = 83, PtrRawData = 84
}
 An enum over C/Fortran primitives in multiple precisions. More...


Public Methods

virtual const char * getName ()=0
 Name associated with this set of buffers. More...

virtual int getNumberOfBuffers ()=0
 The total number of encapsulated buffers. More...

virtual void getBufferInfo (int bufferIndex, const char *&elementName, enum RawDataType &elementType, int &elementCount, void *&buffer)=0
 Returns information about the buffer at the given index. More...

virtual unsigned long sizeofDataType (enum RawDataType)=0
 Returns the size of the given RawDataType in bytes. More...


Detailed Description

A low-level interface for accessing memory.

This interface is designed principally for writers of tools rather than end users because it provides pointers directly to computer memory. This interface may be an efficient way to copy data between components, but end users are normally encouraged to use higher-level interfaces or "views" on data. An example would be one providing for array access patterns.

Another use of this interface is to provide a wrapper for user defined types, as each element can be assigned a unique name. In addition to the primitive data types (and pointers to them), a data element can be a pointer to a RawData object instance, which allows for use of the composite design pattern.


Member Enumeration Documentation

enum gov::cca::RawData::Type
 

An enum over C/Fortran primitives in multiple precisions.

00049             {
00050     Err = 0,
00051     Byte = 1,
00052     Bool = 2,
00053     Char = 3, 
00054     WChar = 4,
00055     Int1 = 5, 
00056     Int2 = 6, 
00057     Int4 = 7, 
00058     Int8 = 8,
00059     UInt1 = 9, 
00060     UInt2 = 10, 
00061     UInt4 = 11, 
00062     UInt8 = 12,
00063     Float4 = 13, 
00064     Float8 = 14, 
00065     Float16 = 15,
00066     Complex4 = 16, 
00067     Complex8 = 17, 
00068     Complex16 = 18, 
00069     Complex32 = 19,
00070     PtrByte = 65,
00071     PtrBool = 66,
00072     PtrChar = 67, 
00073     PtrWChar = 68,
00074     PtrInt1 = 69, 
00075     PtrInt2 = 70, 
00076     PtrInt4 = 71, 
00077     PtrInt8 = 72,
00078     PtrUInt1 = 73, 
00079     PtrUInt2 = 74, 
00080     PtrUInt4 = 75, 
00081     PtrUInt8 = 76,
00082     PtrFloat4 = 77, 
00083     PtrFloat8 = 78, 
00084     PtrFloat16 = 79,
00085     PtrComplex4 = 80, 
00086     PtrComplex8 = 81, 
00087     PtrComplex16 = 82, 
00088     PtrComplex32 = 83,
00089     PtrRawData = 84
00090   };


Member Function Documentation

virtual const char* gov::cca::RawData::getName   [pure virtual]
 

Name associated with this set of buffers.

Returns:
the name.

virtual int gov::cca::RawData::getNumberOfBuffers   [pure virtual]
 

The total number of encapsulated buffers.

Returns:
nBuffers.

virtual void gov::cca::RawData::getBufferInfo int    bufferIndex,
const char *&    elementName,
enum RawDataType &    elementType,
int &    elementCount,
void *&    buffer
[pure virtual]
 

Returns information about the buffer at the given index.

Buffers are indexed from 0 .. getNumberOfBuffers-1.

Parameters:
bufferIndex  Input: the index (from 0) of buffer requested.
elementName  Output: name associated with the buffer (default value is "_UNNAMED")
elementType  Output: enumerated type of the elements in the buffer.
elementCount  Output: length of the buffer.
buffer  Output: pointer to data buffer.

virtual unsigned long gov::cca::RawData::sizeofDataType enum    RawDataType [pure virtual]
 

Returns the size of the given RawDataType in bytes.


The documentation for this class was generated from the following file:
Generated on Tue Aug 20 14:30:32 2002 for CCA Specification/Proposals by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002