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

ESCRIPT_DLL_API DataEmpty ()
 Default constructor for DataEmpty.
virtual ESCRIPT_DLL_API ~DataEmpty ()
 Destructor for DataEmpty.
virtual ESCRIPT_DLL_API std::string toString () const
 Return a textual representation of the Data object.
virtual ESCRIPT_DLL_API
DataAbstract
deepCopy ()
 Return a deep copy of the current object.
virtual ESCRIPT_DLL_API
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 ESCRIPT_DLL_API
DataTypes::ValueType::size_type 
getPointOffset (int sampleNo, int dataPointNo)
virtual ESCRIPT_DLL_API
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 ESCRIPT_DLL_API
DataAbstract
getSlice (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 ESCRIPT_DLL_API 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.
ESCRIPT_DLL_API int matrixInverse (DataAbstract *out) const
 invert square matricies
void dump (const std::string fileName) const
 dumps the object into a netCDF file
ESCRIPT_DLL_API bool hasNaN () const
 return true if data contains NaN.

Protected Member Functions

virtual ESCRIPT_DLL_API
DataTypes::ValueType
getVectorRW ()
 Provide access to underlying storage. Internal use only!
virtual ESCRIPT_DLL_API 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

escript::DataEmpty::DataEmpty (  ) 

Default constructor for DataEmpty.

Description: Default constructor for DataEmpty.

Referenced by deepCopy().

escript::DataEmpty::~DataEmpty (  )  [virtual]

Destructor for DataEmpty.


Member Function Documentation

DataAbstract * escript::DataEmpty::deepCopy (  )  [virtual]

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.

DataTypes::ValueType::size_type escript::DataEmpty::getLength (  )  const [virtual]

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 
) [virtual]

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.

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.

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

Provide access to underlying storage. Internal use only!

Implements escript::DataReady.

ESCRIPT_DLL_API 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:
value Input - Data to copy from
region Input - 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: