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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100 - (hide annotations)
Wed Dec 15 03:48:48 2004 UTC (14 years, 10 months ago) by jgs
Original Path: trunk/esys2/escript/src/Data/DataEmpty.h
File MIME type: text/plain
File size: 3637 byte(s)
*** empty log message ***

1 jgs 82 /*
2     ******************************************************************************
3     * *
4     * COPYRIGHT ACcESS 2004 - All Rights Reserved *
5     * *
6     * This software is the property of ACcESS. No part of this code *
7     * may be copied in any form or by any means without the expressed written *
8     * consent of ACcESS. Copying, use or modification of this software *
9     * by any unauthorised person is illegal unless that person has a software *
10     * license agreement with ACcESS. *
11     * *
12     ******************************************************************************
13     */
14    
15 jgs 100 #if !defined escript_DataEmpty_20040726_H
16 jgs 82 #define escript_DataEmpty_20040726_H
17    
18     #include "DataAbstract.h"
19    
20     namespace escript {
21    
22     /**
23     \brief
24 jgs 100 Impliments the DataAbstract interface for an empty or null Data.
25 jgs 82
26     Description:
27 jgs 100 Impliments the DataAbstract interface for an empty or null Data.
28 jgs 82 */
29 jgs 100 class DataEmpty:public DataAbstract {
30 jgs 82
31     public:
32    
33     /**
34     \brief
35 jgs 100 Default constructor for DataEmpty
36 jgs 82
37     Description:
38 jgs 100 Default constructor for DataEmpty
39 jgs 82
40     */
41     DataEmpty();
42     /**
43     \brief
44 jgs 100 Destructor
45 jgs 82 */
46 jgs 100 virtual ~DataEmpty();
47 jgs 82 /**
48     \brief
49 jgs 100 Return a textual representation of the data
50 jgs 82 */
51 jgs 100 virtual std::string toString() const;
52 jgs 82 /**
53     \brief
54 jgs 100 Return the offset for the given sample. This is somewhat artificial notion
55 jgs 82 but returns the offset in bytes for the given point into the container
56     holding the point data.
57 jgs 100 \param sampleNo - Input, number of samples.
58     \param dataPointNo - Input.
59 jgs 82 */
60 jgs 100 virtual DataArrayView::ValueType::size_type getPointOffset(int sampleNo,int dataPointNo) const;
61 jgs 82 /**
62     \brief
63     Return a view into the data for the data point specified.
64     NOTE: Construction of the DataArrayView is a relatively expensive
65 jgs 100 operation
66     \param samplesNo - Input
67     \param dataPointNo - Input
68 jgs 82 */
69 jgs 100 virtual DataArrayView getDataPoint(int samplesNo, int dataPointNo);
70     /**
71 jgs 82 \brief
72     Return the sample data for the given tag key. If the data isn't tagged
73     an exception will be thrown.
74     */
75 jgs 100 virtual double* getSampleDataByTag(int tag);
76 jgs 82 /**
77     \brief
78     Throw a standard exception. This function is called if an attempt
79 jgs 100 is made to use functions of DataEmpty that are not allowed.
80 jgs 82 */
81 jgs 100 void throwStandardException(const std::string& functionName) const;
82 jgs 82 /**
83     \brief
84 jgs 100 Return the number of doubles stored for the Data
85 jgs 82 */
86 jgs 100 virtual ValueType::size_type getLength() const;
87 jgs 82 /**
88     \brief
89 jgs 100 Factory method that returns a newly created DataEmpty.
90 jgs 82 The caller is reponsible for managing the object created.
91     */
92 jgs 100 virtual DataAbstract* getSlice(const DataArrayView::RegionType& region) const; /**
93 jgs 82 \brief
94 jgs 100 Copy the specified region from the given value.
95 jgs 82 \param value Input - Data to copy from
96     \param region Input - Region to copy.
97     */
98 jgs 100 virtual void setSlice(const DataAbstract* value, const DataArrayView::RegionType& region);
99 jgs 82 /**
100     \brief
101     Reshape the data point if the data point is currently rank 0.
102     The original data point value is used for all values of the new
103     data point.
104     */
105 jgs 100 virtual void reshapeDataPoint(const DataArrayView::ShapeType& shape);
106 jgs 82 protected:
107    
108     private:
109     };
110    
111     } // end of namespace
112     #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26