escript  Revision_
Public Member Functions | Protected Member Functions | Private Types
escript::DataEmpty Class Reference

Implements the DataAbstract interface for an empty Data object. More...

#include <DataEmpty.h>

Inheritance diagram for escript::DataEmpty:
escript::DataReady escript::DataAbstract

List of all members.

Public Member Functions

 DataEmpty ()
 Default constructor for DataEmpty.
virtual ~DataEmpty ()
 Destructor for DataEmpty.
virtual std::string toString () const
 Return a textual representation of the Data object.
virtual DataAbstractdeepCopy ()
 Return a deep copy of the current object.
virtual
DataTypes::ValueType::size_type 
getPointOffset (int sampleNo, int dataPointNo) const
 Return the offset for the given sample. NB: This will throw an exception as obviously an empty Data object contains no samples. An implementation is required by parent DataAbstract class.
virtual
DataTypes::ValueType::size_type 
getPointOffset (int sampleNo, int dataPointNo)
virtual ValueType::size_type getLength () const
 Return the number of doubles stored for the Data object. As this is an empty Data object, this method will always return 0.
virtual DataAbstractgetSlice (const DataTypes::RegionType &region) const
 Factory method that returns a newly created DataEmpty sliced from the current Data object according to the specified region. NB: This will throw an exception as obviously an empty Data object contains no data to slice from. An implementation is required by parent DataAbstract class.
virtual void setSlice (const DataAbstract *value, const DataTypes::RegionType &region)
 Set the current Data object according to the specified slice from the given input value. NB: This will throw an exception as obviously an empty Data object contains no data to slice to. An implementation is required by parent DataAbstract class.
int matrixInverse (DataAbstract *out) const
 invert square matricies
void dump (const std::string fileName) const
 dumps the object into a netCDF file
bool hasNaN () const
 return true if data contains NaN.

Protected Member Functions

virtual DataTypes::ValueTypegetVectorRW ()
 Provide access to underlying storage. Internal use only!
virtual const
DataTypes::ValueType
getVectorRO () const

Private Types

typedef DataReady parent

Detailed Description

Implements the DataAbstract interface for an empty Data object.

Description: Implements the DataAbstract interface for an empty Data object.


Member Typedef Documentation

Reimplemented from escript::DataReady.


Constructor & Destructor Documentation

Default constructor for DataEmpty.

Description: Default constructor for DataEmpty.

Referenced by deepCopy().

Destructor for DataEmpty.


Member Function Documentation

Return a deep copy of the current object.

Implements escript::DataAbstract.

References DataEmpty().

void escript::DataEmpty::dump ( const std::string  fileName) const [virtual]

dumps the object into a netCDF file

Reimplemented from escript::DataAbstract.

Return the number of doubles stored for the Data object. As this is an empty Data object, this method will always return 0.

Implements escript::DataAbstract.

DataTypes::ValueType::size_type escript::DataEmpty::getPointOffset ( int  sampleNo,
int  dataPointNo 
) const [virtual]

Return the offset for the given sample. NB: This will throw an exception as obviously an empty Data object contains no samples. An implementation is required by parent DataAbstract class.

Parameters:
sampleNo- Input - Sample number.
dataPointNo- Input - data-point number.

Implements escript::DataAbstract.

DataTypes::ValueType::size_type escript::DataEmpty::getPointOffset ( int  sampleNo,
int  dataPointNo 
) [virtual]

Implements escript::DataAbstract.

DataAbstract * escript::DataEmpty::getSlice ( const DataTypes::RegionType region) const [virtual]

Factory method that returns a newly created DataEmpty sliced from the current Data object according to the specified region. NB: This will throw an exception as obviously an empty Data object contains no data to slice from. An implementation is required by parent DataAbstract class.

Implements escript::DataAbstract.

const DataTypes::ValueType & escript::DataEmpty::getVectorRO ( ) const [protected, virtual]

Implements escript::DataReady.

Provide access to underlying storage. Internal use only!

Implements escript::DataReady.

bool escript::DataEmpty::hasNaN ( ) const [inline, virtual]

return true if data contains NaN.

Warning:
This is dependent on the ability to reliably detect NaNs on your compiler. See the nancheck function in LocalOps for details.

Implements escript::DataReady.

int escript::DataEmpty::matrixInverse ( DataAbstract out) const [virtual]

invert square matricies

Parameters:
out- Where to store the results
Returns:
errorcode (0 indicates success)

Reimplemented from escript::DataAbstract.

void escript::DataEmpty::setSlice ( const DataAbstract value,
const DataTypes::RegionType region 
) [virtual]

Set the current Data object according to the specified slice from the given input value. NB: This will throw an exception as obviously an empty Data object contains no data to slice to. An implementation is required by parent DataAbstract class.

Parameters:
valueInput - Data to copy from
regionInput - Region to copy.

Implements escript::DataReady.

std::string escript::DataEmpty::toString ( ) const [virtual]

Return a textual representation of the Data object.

Implements escript::DataAbstract.


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