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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 615 - (show annotations)
Wed Mar 22 02:12:00 2006 UTC (13 years, 7 months ago) by elspeth
File size: 1878 byte(s)
More copyright information.

1 //$Id$
2
3 /*
4 ************************************************************
5 * Copyright 2006 by ACcESS MNRF *
6 * *
7 * http://www.access.edu.au *
8 * Primary Business: Queensland, Australia *
9 * Licensed under the Open Software License version 3.0 *
10 * http://www.opensource.org/licenses/osl-3.0.php *
11 * *
12 ************************************************************
13 */
14
15 #include "DataEmpty.h"
16 #include "DataException.h"
17
18 namespace escript {
19
20 DataEmpty::DataEmpty() :
21 DataAbstract(FunctionSpace())
22 {
23 resetPointDataView();
24 }
25
26 DataEmpty::~DataEmpty()
27 {
28 }
29
30 std::string
31 DataEmpty::toString() const
32 {
33 return "(Empty Data)";
34 }
35
36 DataArrayView::ValueType::size_type
37 DataEmpty::getPointOffset(int sampleNo,
38 int dataPointNo) const
39 {
40 throwStandardException("getPointOffset");
41 return 0;
42 }
43
44 DataArrayView
45 DataEmpty::getDataPoint(int sampleNo,
46 int dataPointNo)
47 {
48 throwStandardException("getDataPoint");
49 return getPointDataView();
50 }
51
52 DataArrayView::ValueType::size_type
53 DataEmpty::getLength() const
54 {
55 return 0;
56 }
57
58 DataAbstract*
59 DataEmpty::getSlice(const DataArrayView::RegionType& region) const
60 {
61 throwStandardException("getSlice");
62 return 0;
63 }
64
65 void
66 DataEmpty::setSlice(const DataAbstract* value,
67 const DataArrayView::RegionType& region)
68 {
69 throwStandardException("setSlice");
70 }
71
72 void
73 DataEmpty::reshapeDataPoint(const DataArrayView::ShapeType& shape)
74 {
75 throwStandardException("reshapeDataPoint");
76 }
77
78 void
79 DataEmpty::throwStandardException(const std::string& functionName) const
80 {
81 throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
82 }
83
84 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26