xsil::array Class Reference
[Xsil document preparation]

#include <array.hh>

Inheritance diagram for xsil::array:

xsil::xobj

List of all members.

Public Member Functions

 array (void)
 array (const char *Name, const char *Type=0, const char *Unit=0)
 ~array (void)
void Spew (Xwriter &xout) const
arrayClone (void) const
const char * getObjType (void) const
const char * getUnit (void) const
int getNDim (void) const
int getTotLen (void) const
int getDim (int iDim) const
void getData (std::vector< double > &vf)
 Get data from the array.
void getData (std::vector< float > &vf)
 Get data from the array.
void getData (std::vector< int > &vf)
 Get data from the array.
void getData (std::vector< std::string > &vf)
 Get data from the array.
int addDim (const char *Name, int nDim)
int addDim (const dim &Dim)
void setUnit (const char *Unit)
void setStream (const Stream &istr)
void setRemote (const char *File)
void FillData (int N, int *Data)
void FillData (int N, float *Data)
void FillData (int N, double *Data)
void FillData (int N, std::string *Data)
StreamrefStream (void)
const StreamrefStream (void) const


Detailed Description

The array class contains data elements organized as an N-dimensional array of a single data type. The last dimension varies the most rapidly. The array class contains an xsil stream to initialize the array data. brief XSIL Array class.
Author:
J. Zweizig
Version:
1.1; Modified December 13, 1999

Constructor & Destructor Documentation

xsil::array::array ( void   ) 

Default constructor. brief Default constructor.

xsil::array::array ( const char *  Name,
const char *  Type = 0,
const char *  Unit = 0 
)

Data constructor. brief Default constructor.

Parameters:
Name Pointer to the array name.
Type Pointer to the array type.
Unit Pointer to the array units.

xsil::array::~array ( void   ) 

Destructor. brief Destructor.


Member Function Documentation

void xsil::array::Spew ( Xwriter xout  )  const [virtual]

Write the array definition to an XML file. brief Write an XML array definition.

Parameters:
xout XML writer object to receive the array definition.

Implements xsil::xobj.

array* xsil::array::Clone ( void   )  const [virtual]

Clone the array object definition. brief Clone an array definition object.

Returns:
Pointer to te cloned object.

Implements xsil::xobj.

const char* xsil::array::getObjType ( void   )  const [virtual]

Get the object type. brief Get object type.

Returns:
Pointer to the object type string.

Implements xsil::xobj.

const char * xsil::array::getUnit ( void   )  const [inline]

Get the array units. brief Get the units.

Returns:
poitner to the units string.

int xsil::array::getNDim ( void   )  const [inline]

Get the number of dimensions. brief Get the number of array dimensions.

Returns:
Number of dimenstion defined for this array.

int xsil::array::getTotLen ( void   )  const

Get the number of dimensions. brief Get the number of array dimensions.

Returns:
Number of dimenstion defined for this array.

int xsil::array::getDim ( int  iDim  )  const [inline]

Get the specified dimension. brief get the specified dimension.

Parameters:
iDim Dmension number to be interrogated.
Returns:
the iDimth dimension.

void xsil::array::getData ( std::vector< double > &  vf  ) 

Get data from the array.

Read data from the array stream into a double STL vector.

Parameters:
vf STL vector object to receive the data.

void xsil::array::getData ( std::vector< float > &  vf  ) 

Get data from the array.

Read data from the array stream into a float STL vector.

Parameters:
vf STL vector object to receive the data.

void xsil::array::getData ( std::vector< int > &  vf  ) 

Get data from the array.

Read data from the array stream into an int STL vector.

Parameters:
vf STL vector object to receive the data.

void xsil::array::getData ( std::vector< std::string > &  vf  ) 

Get data from the array.

Read data from the array stream into a string STL vector.

Parameters:
vf STL vector object to receive the data.

int xsil::array::addDim ( const char *  Name,
int  nDim 
)

Add a dimension to the array. brief Add a dimension.

Returns:
Dimension number.
Parameters:
Name Dimension name
nDim Size of added dimension.

int xsil::array::addDim ( const dim Dim  ) 

Add a dimension to the array. brief Add a dimension.

Returns:
Dimension number.
Parameters:
Dim Dimension block.

void xsil::array::setUnit ( const char *  Unit  ) 

Set the array units. brief set the array units.

Parameters:
Unit Pointer to the units string.

void xsil::array::setStream ( const Stream istr  ) 

Add a stream to the array. brief Add a stream to the array.

Parameters:
istr Stream object to be added to the array.

void xsil::array::setRemote ( const char *  File  ) 

Set remote stream. brief Set a remote stream.

Parameters:
File Name of file containing remote data.

void xsil::array::FillData ( int  N,
int *  Data 
)

Add a local initialization stream with specified integer data. brief Add a data stream.

Parameters:
N Number of data words.
Data Integer array containing data for the array.

void xsil::array::FillData ( int  N,
float *  Data 
)

Add a local initialization stream with specified float data. brief Add a data stream.

Parameters:
N Number of data words.
Data Float array containing data for the array.

void xsil::array::FillData ( int  N,
double *  Data 
)

Add a local initialization stream with specified double data. brief Add a data stream.

Parameters:
N Number of data words.
Data Double array containing data for the array.

void xsil::array::FillData ( int  N,
std::string *  Data 
)

Add a local initialization stream with specified string data. brief Add a data stream.

Parameters:
N Number of data words.
Data String array containing data for the array.

xsil::Stream & xsil::array::refStream ( void   )  [inline]

Get reference to an initialization stream. brief Reference initialization strem.

Returns:
reference to the initialization stream.

const xsil::Stream & xsil::array::refStream ( void   )  const [inline]

Get reference to an initialization stream. brief Reference initialization strem.

Returns:
reference to the initialization stream.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:48 2009 for dmt by  doxygen 1.5.4