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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1387 - (show annotations)
Fri Jan 11 07:45:26 2008 UTC (11 years, 9 months ago) by trankine
Original Path: temp/escript/src/DataEmpty.cpp
File size: 1622 byte(s)
Restore the trunk that existed before the windows changes were committed to the (now moved to branches) old trunk.
1
2 /* $Id$ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 #include "DataEmpty.h"
17 #include "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 DataArrayView::ValueType::size_type
38 DataEmpty::getPointOffset(int sampleNo,
39 int dataPointNo) const
40 {
41 throwStandardException("getPointOffset");
42 return 0;
43 }
44
45 DataArrayView
46 DataEmpty::getDataPoint(int sampleNo,
47 int dataPointNo)
48 {
49 throwStandardException("getDataPoint");
50 return getPointDataView();
51 }
52
53 DataArrayView::ValueType::size_type
54 DataEmpty::getLength() const
55 {
56 return 0;
57 }
58
59 DataAbstract*
60 DataEmpty::getSlice(const DataArrayView::RegionType& region) const
61 {
62 throwStandardException("getSlice");
63 return 0;
64 }
65
66 void
67 DataEmpty::setSlice(const DataAbstract* value,
68 const DataArrayView::RegionType& region)
69 {
70 throwStandardException("setSlice");
71 }
72
73 void
74 DataEmpty::throwStandardException(const std::string& functionName) const
75 {
76 throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
77 }
78
79 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26