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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/escript/src/Data/DataEmpty.cpp revision 100 by jgs, Wed Dec 15 03:48:48 2004 UTC trunk/escript/src/DataEmpty.cpp revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
 /*  
  ******************************************************************************  
  *                                                                            *  
  *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  
  *                                                                            *  
  * This software is the property of ACcESS. No part of this code              *  
  * may be copied in any form or by any means without the expressed written    *  
  * consent of ACcESS.  Copying, use or modification of this software          *  
  * by any unauthorised person is illegal unless that person has a software    *  
  * license agreement with ACcESS.                                             *  
  *                                                                            *  
  ******************************************************************************  
 */  
1    
2  #include "escript/Data/DataEmpty.h"  /* $Id$ */
3  #include "escript/Data/DataException.h"  
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 {  namespace escript {
20    
21  DataEmpty::DataEmpty() :  DataEmpty::DataEmpty() :
22  DataAbstract(FunctionSpace())    DataAbstract(FunctionSpace())
23  {  {
24      resetPointDataView();
25  }  }
26    
27  DataEmpty::~DataEmpty() {  DataEmpty::~DataEmpty()
 }  
   
 std::string DataEmpty::toString() const {  
   return "Empty Data.";  
 }  
   
 void DataEmpty::throwStandardException(const std::string& functionName) const  
28  {  {
   throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");  
29  }  }
30    
31  DataArrayView::ValueType::size_type DataEmpty::getPointOffset(int sampleNo,int dataPointNo) const  std::string
32    DataEmpty::toString() const
33  {  {
34    throwStandardException("getPointOffset");    return "(Empty Data)";
   return 0;  
35  }  }
36    
37  double* DataEmpty::getSampleDataByTag(int tag)  DataArrayView::ValueType::size_type
38    DataEmpty::getPointOffset(int sampleNo,
39                              int dataPointNo) const
40  {  {
41    throwStandardException("getSampleDataByTag");    throwStandardException("getPointOffset");
42    return 0;    return 0;
43  }  }
44    
45  DataArrayView DataEmpty::getDataPoint(int samplesNo, int dataPointNo)  DataArrayView
46    DataEmpty::getDataPoint(int sampleNo,
47                            int dataPointNo)
48  {  {
49    throwStandardException("getDataPoint");    throwStandardException("getDataPoint");
50    return getPointDataView();    return getPointDataView();
51  }  }
52    
53  DataArrayView::ValueType::size_type DataEmpty::getLength() const  DataArrayView::ValueType::size_type
54    DataEmpty::getLength() const
55  {  {
56    return 0;    return 0;
57  }  }
58    
59  DataAbstract* DataEmpty::getSlice(const DataArrayView::RegionType& region) const  DataAbstract*
60    DataEmpty::getSlice(const DataArrayView::RegionType& region) const
61  {  {
62    throwStandardException("getSlice");    throwStandardException("getSlice");
63    return 0;    return 0;
64  }  }
65    
66  void DataEmpty::setSlice(const DataAbstract* value, const DataArrayView::RegionType& region)  void
67    DataEmpty::setSlice(const DataAbstract* value,
68                        const DataArrayView::RegionType& region)
69  {  {
70    throwStandardException("setSlice");    throwStandardException("setSlice");
71  }  }
72    
73  void  DataEmpty::reshapeDataPoint(const DataArrayView::ShapeType& shape)  void
74    DataEmpty::throwStandardException(const std::string& functionName) const
75  {  {
76    throwStandardException("reshapeDataPoint");    throw DataException("Error - "+functionName+" function call invalid for DataEmpty.");
77  }  }
78    
79  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.100  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26