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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 102 - (show annotations)
Wed Dec 15 07:08:39 2004 UTC (14 years, 10 months ago) by jgs
Original Path: trunk/esys2/escript/src/Data/DataEmpty.cpp
File size: 2312 byte(s)
*** empty log message ***

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26