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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 474 - (hide annotations)
Mon Jan 30 04:23:44 2006 UTC (13 years, 8 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 jgs 102 //$Id$
2 jgs 121
3 jgs 82 /*
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 jgs 474 #include "DataEmpty.h"
18     #include "DataException.h"
19 jgs 82
20     namespace escript {
21    
22     DataEmpty::DataEmpty() :
23 jgs 102 DataAbstract(FunctionSpace())
24 jgs 82 {
25 jgs 119 resetPointDataView();
26 jgs 82 }
27    
28 jgs 102 DataEmpty::~DataEmpty()
29     {
30 jgs 82 }
31    
32 jgs 102 std::string
33     DataEmpty::toString() const
34     {
35 jgs 121 return "(Empty Data)";
36 jgs 82 }
37    
38 jgs 102 DataArrayView::ValueType::size_type
39     DataEmpty::getPointOffset(int sampleNo,
40     int dataPointNo) const
41 jgs 82 {
42     throwStandardException("getPointOffset");
43     return 0;
44     }
45    
46 jgs 102 DataArrayView
47     DataEmpty::getDataPoint(int sampleNo,
48     int dataPointNo)
49 jgs 82 {
50     throwStandardException("getDataPoint");
51     return getPointDataView();
52     }
53    
54 jgs 102 DataArrayView::ValueType::size_type
55     DataEmpty::getLength() const
56 jgs 82 {
57     return 0;
58     }
59    
60 jgs 102 DataAbstract*
61     DataEmpty::getSlice(const DataArrayView::RegionType& region) const
62 jgs 82 {
63     throwStandardException("getSlice");
64     return 0;
65     }
66    
67 jgs 102 void
68     DataEmpty::setSlice(const DataAbstract* value,
69     const DataArrayView::RegionType& region)
70 jgs 82 {
71     throwStandardException("setSlice");
72     }
73    
74 jgs 102 void
75     DataEmpty::reshapeDataPoint(const DataArrayView::ShapeType& shape)
76 jgs 82 {
77     throwStandardException("reshapeDataPoint");
78     }
79    
80 jgs 121 void
81     DataEmpty::throwStandardException(const std::string& functionName) const
82     {
83     throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
84     }
85    
86 jgs 82 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26