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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2019 - (hide annotations)
Mon Nov 10 13:49:00 2008 UTC (10 years, 11 months ago) by phornby
File MIME type: text/plain
File size: 2257 byte(s)
Yet another concerted effort to handle missing macro arguments
in a portable way.


1 jgs 474
2 ksteube 1312 /*******************************************************
3 phornby 1455 *
4 ksteube 1811 * Copyright (c) 2003-2008 by University of Queensland
5     * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7 phornby 1455 *
8 ksteube 1811 * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11 phornby 1455 *
12     *******************************************************/
13 ksteube 1312
14 ksteube 1811
15 jgs 82 #if !defined escript_DomainException_20040608_H
16     #define escript_DomainException_20040608_H
17 woo409 757 #include "system_dep.h"
18 jgs 82
19 robwdcock 682 #include "esysUtils/EsysException.h"
20 jgs 474
21 phornby 1455 namespace escript
22     {
23 jgs 82
24 phornby 1455 /**
25     \brief
26     DomainException exception class.
27 jgs 82
28 phornby 1455 Description:
29     DomainException exception class.
30     The class provides a public function returning the exception name
31     */
32     class DomainException : public esysUtils::EsysException
33     {
34 jgs 82
35 phornby 1455 protected:
36 jgs 82
37 phornby 1455 typedef EsysException Parent;
38 phornby 1020
39 phornby 1455 public:
40     /**
41     \brief
42     Default constructor for the exception.
43     */
44     ESCRIPT_DLL_API
45     DomainException() : Parent() { updateMessage();}
46     /**
47     \brief
48     Constructor for the exception.
49     */
50     ESCRIPT_DLL_API
51     DomainException(const char *cstr) : Parent(cstr) { updateMessage();}
52     /**
53     \brief
54     Constructor for the exception.
55     */
56     ESCRIPT_DLL_API
57     DomainException(const std::string &str) : Parent(str) { updateMessage();}
58     /**
59     \brief
60     Copy Constructor for the exception.
61     */
62     ESCRIPT_DLL_API
63     DomainException(const DomainException &other) : Parent(other)
64     {
65     updateMessage();
66     }
67 jgs 82
68 phornby 1628 ESCRIPT_DLL_API
69     inline virtual DomainException &
70 phornby 2019 operator=(const DomainException &other ) THROW(NO_ARG)
71 phornby 1628 {
72     Parent::operator=(other);
73     updateMessage();
74     return *this;
75     }
76    
77 phornby 1455 /// Destructor
78     ESCRIPT_DLL_API
79 phornby 2019 virtual ~DomainException() THROW(NO_ARG) {}
80 phornby 1455 /**
81     \brief
82     Returns the name of the exception.
83     */
84     ESCRIPT_DLL_API
85     virtual const std::string & exceptionName() const;
86    
87     private:
88    
89     //
90     // the exception name is immutable and class-wide.
91     // Inheritor note; you need one of these too.
92     // and an overloaded exceptionName() in your .cpp implementation file.
93     static const std::string exceptionNameValue;
94     };
95    
96 jgs 82 } // end of namespace
97     #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26