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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 474 - (show annotations)
Mon Jan 30 04:23:44 2006 UTC (13 years, 9 months ago) by jgs
File size: 2200 byte(s)
restructure escript source tree
move src/Data/* -> src
remove inc
modify #includes and cpppath settings accordingly

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26