classic::gov::cca::RawData Class Reference

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

#include <RawData.h>

Inheritance diagram for classic::gov::cca::RawData:

Inheritance graph
[legend]
Collaboration diagram for classic::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 Member Functions

virtual const char * getName () CLASSIC_CCA_PURE
 Name associated with this set of buffers.
virtual int getNumberOfBuffers () CLASSIC_CCA_PURE
 The total number of encapsulated buffers.
virtual void getBufferInfo (int bufferIndex, const char *&elementName, enum RawDataType &elementType, int &elementCount, void *&buffer) CLASSIC_CCA_PURE
 Returns information about the buffer at the given index.
virtual unsigned long sizeofDataType (enum RawDataType) CLASSIC_CCA_PURE
 Returns the size of the given RawDataType in bytes.


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

An enum over C/Fortran primitives in multiple precisions.

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


Member Function Documentation

virtual const char* classic::gov::cca::RawData::getName (  )  [virtual]

Name associated with this set of buffers.

Returns:
the name.

virtual int classic::gov::cca::RawData::getNumberOfBuffers (  )  [virtual]

The total number of encapsulated buffers.

Returns:
nBuffers.

virtual void classic::gov::cca::RawData::getBufferInfo ( int  bufferIndex,
const char *&  elementName,
enum RawDataType &  elementType,
int &  elementCount,
void *&  buffer 
) [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 classic::gov::cca::RawData::sizeofDataType ( enum  RawDataType  )  [virtual]

Returns the size of the given RawDataType in bytes.


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

Generated on Thu Mar 3 08:43:36 2011 for 'Classic' CCA c++ binding (ccaffeine-only) by  doxygen 1.5.9