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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3981 - (hide annotations)
Fri Sep 21 02:47:54 2012 UTC (7 years ago) by jfenwick
File MIME type: text/plain
File size: 2350 byte(s)
First pass of updating copyright notices
1 jgs 474
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 3911 * Copyright (c) 2003-2012 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
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 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     * Development since 2012 by School of Earth Sciences
13     *
14     *****************************************************************************/
15 ksteube 1312
16 ksteube 1811
17 jgs 82 #if !defined escript_DataException_20040324_H
18     #define escript_DataException_20040324_H
19 woo409 757 #include "system_dep.h"
20 jgs 82
21 robwdcock 682 #include "esysUtils/EsysException.h"
22 jgs 474
23 phornby 1455 namespace escript
24     {
25 jgs 82
26 phornby 1455 /**
27     \brief
28     DataException exception class.
29 jgs 82
30 phornby 1455 Description:
31     DataException exception class.
32     The class provides a public function returning the exception name
33     */
34     class DataException : public esysUtils::EsysException
35     {
36 jgs 82
37 phornby 1455 protected:
38 jgs 82
39 phornby 1455 typedef EsysException Parent;
40 phornby 1020
41 phornby 1455 public:
42     /**
43     \brief
44     Default constructor for the exception.
45     */
46     ESCRIPT_DLL_API
47     DataException() : Parent() { updateMessage();}
48     /**
49     \brief
50     Constructor for the exception.
51     */
52     ESCRIPT_DLL_API
53     DataException(const char *cstr) : Parent(cstr) { updateMessage();}
54     /**
55     \brief
56     Constructor for the exception.
57     */
58     ESCRIPT_DLL_API
59     DataException(const std::string &str) : Parent(str) { updateMessage();}
60     /**
61     \brief
62     Copy Constructor for the exception.
63     */
64     ESCRIPT_DLL_API
65     DataException(const DataException &other) : Parent(other)
66     {
67     updateMessage();
68     }
69 phornby 1020
70 phornby 1628 ESCRIPT_DLL_API
71 phornby 1649 inline DataException &
72 phornby 2019 operator=(const DataException &other ) THROW(NO_ARG)
73 phornby 1628 {
74     Parent::operator=(other);
75     updateMessage();
76     return *this;
77     }
78 jgs 82
79 phornby 1628
80 phornby 1455 /// Destructor
81     ESCRIPT_DLL_API
82 phornby 2019 virtual ~DataException() THROW(NO_ARG) {}
83 phornby 1455
84     /**
85     \brief
86     Returns the name of the exception.
87     */
88     ESCRIPT_DLL_API
89     virtual const std::string & exceptionName() const;
90    
91     private:
92    
93     //
94     // the exception name is immutable and class-wide.
95     // Inheritor note; you need one of these too.
96     // and an overloaded exceptionName() in your .cpp implementation file.
97     static const std::string exceptionNameValue;
98    
99    
100     };
101    
102 jgs 82 } // end of namespace
103 phornby 1455
104    
105 jgs 82 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26