/[escript]/trunk/escript/src/DataEmpty.cpp
ViewVC logotype

Contents of /trunk/escript/src/DataEmpty.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100 - (show annotations)
Wed Dec 15 03:48:48 2004 UTC (14 years, 9 months ago) by jgs
Original Path: trunk/esys2/escript/src/Data/DataEmpty.cpp
File size: 2234 byte(s)
*** empty log message ***

1 /*
2 ******************************************************************************
3 * *
4 * COPYRIGHT ACcESS 2004 - All Rights Reserved *
5 * *
6 * This software is the property of ACcESS. No part of this code *
7 * may be copied in any form or by any means without the expressed written *
8 * consent of ACcESS. Copying, use or modification of this software *
9 * by any unauthorised person is illegal unless that person has a software *
10 * license agreement with ACcESS. *
11 * *
12 ******************************************************************************
13 */
14
15 #include "escript/Data/DataEmpty.h"
16 #include "escript/Data/DataException.h"
17
18 namespace escript {
19
20 DataEmpty::DataEmpty() :
21 DataAbstract(FunctionSpace())
22 {
23 }
24
25 DataEmpty::~DataEmpty() {
26 }
27
28 std::string DataEmpty::toString() const {
29 return "Empty Data.";
30 }
31
32 void DataEmpty::throwStandardException(const std::string& functionName) const
33 {
34 throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
35 }
36
37 DataArrayView::ValueType::size_type DataEmpty::getPointOffset(int sampleNo,int dataPointNo) const
38 {
39 throwStandardException("getPointOffset");
40 return 0;
41 }
42
43 double* DataEmpty::getSampleDataByTag(int tag)
44 {
45 throwStandardException("getSampleDataByTag");
46 return 0;
47 }
48
49 DataArrayView DataEmpty::getDataPoint(int samplesNo, int dataPointNo)
50 {
51 throwStandardException("getDataPoint");
52 return getPointDataView();
53 }
54
55 DataArrayView::ValueType::size_type DataEmpty::getLength() const
56 {
57 return 0;
58 }
59
60 DataAbstract* DataEmpty::getSlice(const DataArrayView::RegionType& region) const
61 {
62 throwStandardException("getSlice");
63 return 0;
64 }
65
66 void DataEmpty::setSlice(const DataAbstract* value, const DataArrayView::RegionType& region)
67 {
68 throwStandardException("setSlice");
69 }
70
71 void DataEmpty::reshapeDataPoint(const DataArrayView::ShapeType& shape)
72 {
73 throwStandardException("reshapeDataPoint");
74 }
75
76 } // end of namespace

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26