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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26