escript
Revision_
|
00001 00002 /***************************************************************************** 00003 * 00004 * Copyright (c) 2003-2014 by University of Queensland 00005 * http://www.uq.edu.au 00006 * 00007 * Primary Business: Queensland, Australia 00008 * Licensed under the Open Software License version 3.0 00009 * http://www.opensource.org/licenses/osl-3.0.php 00010 * 00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC) 00012 * Development 2012-2013 by School of Earth Sciences 00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp) 00014 * 00015 *****************************************************************************/ 00016 00017 00018 #if !defined escript_DataEmpty_20040726_H 00019 #define escript_DataEmpty_20040726_H 00020 #include "system_dep.h" 00021 00022 #include "DataReady.h" 00023 00024 namespace escript { 00025 00034 class DataEmpty : public DataReady { 00035 typedef DataReady parent; 00036 public: 00037 00046 ESCRIPT_DLL_API 00047 DataEmpty(); 00048 00053 ESCRIPT_DLL_API 00054 virtual 00055 ~DataEmpty(); 00056 00061 ESCRIPT_DLL_API 00062 virtual 00063 std::string 00064 toString() const; 00065 00069 ESCRIPT_DLL_API 00070 virtual 00071 DataAbstract* 00072 deepCopy(); 00073 00074 00083 ESCRIPT_DLL_API 00084 virtual 00085 DataTypes::ValueType::size_type 00086 getPointOffset(int sampleNo, 00087 int dataPointNo) const; 00088 00089 ESCRIPT_DLL_API 00090 virtual 00091 DataTypes::ValueType::size_type 00092 getPointOffset(int sampleNo, 00093 int dataPointNo); 00094 00100 ESCRIPT_DLL_API 00101 virtual 00102 ValueType::size_type 00103 getLength() const; 00104 00112 ESCRIPT_DLL_API 00113 virtual 00114 DataAbstract* 00115 getSlice(const DataTypes::RegionType& region) const; 00116 00126 ESCRIPT_DLL_API 00127 virtual 00128 void 00129 setSlice(const DataAbstract* value, 00130 const DataTypes::RegionType& region); 00131 00137 ESCRIPT_DLL_API 00138 int 00139 matrixInverse(DataAbstract* out) const; 00140 00141 void 00142 dump(const std::string fileName) const; 00143 00144 ESCRIPT_DLL_API 00145 bool 00146 hasNaN() const 00147 { 00148 return false; 00149 } 00150 protected: 00151 00155 ESCRIPT_DLL_API 00156 virtual DataTypes::ValueType& 00157 getVectorRW(); 00158 00159 00160 ESCRIPT_DLL_API 00161 virtual const DataTypes::ValueType& 00162 getVectorRO() const; 00163 00164 00165 private: 00166 00167 // /** 00168 /* \brief 00169 Throw a standard exception. This function is called if an attempt 00170 is made to use functions of DataEmpty that are not valid.*/ 00171 // */ 00172 // void 00173 // throwStandardException(const std::string& functionName) const; 00174 00175 }; 00176 00177 } // end of namespace 00178 00179 #endif