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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 119 - (show annotations)
Tue Apr 12 04:45:05 2005 UTC (14 years, 5 months ago) by jgs
Original Path: trunk/esys2/escript/src/Data/DataEmpty.cpp
File size: 2336 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 resetPointDataView();
25 }
26
27 DataEmpty::~DataEmpty()
28 {
29 }
30
31 std::string
32 DataEmpty::toString() const
33 {
34 return "Empty Data.";
35 }
36
37 void
38 DataEmpty::throwStandardException(const std::string& functionName) const
39 {
40 throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
41 }
42
43 DataArrayView::ValueType::size_type
44 DataEmpty::getPointOffset(int sampleNo,
45 int dataPointNo) const
46 {
47 throwStandardException("getPointOffset");
48 return 0;
49 }
50
51 double*
52 DataEmpty::getSampleDataByTag(int tag)
53 {
54 throwStandardException("getSampleDataByTag");
55 return 0;
56 }
57
58 DataArrayView
59 DataEmpty::getDataPoint(int sampleNo,
60 int dataPointNo)
61 {
62 throwStandardException("getDataPoint");
63 return getPointDataView();
64 }
65
66 DataArrayView::ValueType::size_type
67 DataEmpty::getLength() const
68 {
69 return 0;
70 }
71
72 DataAbstract*
73 DataEmpty::getSlice(const DataArrayView::RegionType& region) const
74 {
75 throwStandardException("getSlice");
76 return 0;
77 }
78
79 void
80 DataEmpty::setSlice(const DataAbstract* value,
81 const DataArrayView::RegionType& region)
82 {
83 throwStandardException("setSlice");
84 }
85
86 void
87 DataEmpty::reshapeDataPoint(const DataArrayView::ShapeType& shape)
88 {
89 throwStandardException("reshapeDataPoint");
90 }
91
92 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26