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

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

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

revision 1454 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1455 by phornby, Thu Feb 28 17:19:44 2008 UTC
# Line 2  Line 2 
2  /* $Id$ */  /* $Id$ */
3    
4  /*******************************************************  /*******************************************************
5   *  *
6   *           Copyright 2003-2007 by ACceSS MNRF  *           Copyright 2003-2007 by ACceSS MNRF
7   *       Copyright 2007 by University of Queensland  *       Copyright 2007 by University of Queensland
8   *  *
9   *                http://esscc.uq.edu.au  *                http://esscc.uq.edu.au
10   *        Primary Business: Queensland, Australia  *        Primary Business: Queensland, Australia
11   *  Licensed under the Open Software License version 3.0  *  Licensed under the Open Software License version 3.0
12   *     http://www.opensource.org/licenses/osl-3.0.php  *     http://www.opensource.org/licenses/osl-3.0.php
13   *  *
14   *******************************************************/  *******************************************************/
15    
16  #if !defined  escript_DomainException_20040608_H  #if !defined  escript_DomainException_20040608_H
17  #define escript_DomainException_20040608_H  #define escript_DomainException_20040608_H
# Line 19  Line 19 
19    
20  #include "esysUtils/EsysException.h"  #include "esysUtils/EsysException.h"
21    
22  #include <string>  namespace escript
23    {
24    
25  namespace escript {    /**
26      \brief
27      DomainException exception class.
28    
29  /**    Description:
30     \brief    DomainException exception class.
31     DomainException exception class.    The class provides a public function returning the exception name
32      */
33      class DomainException : public esysUtils::EsysException
34      {
35    
36     Description:    protected:
    DomainException exception class.  
    The class provides a public function returning the exception name  
 */  
 class DomainException:public esysUtils::EsysException {  
37    
38   public:      typedef EsysException Parent;
   /**  
      \brief  
      Default constructor for the exception.  
   */  
   ESCRIPT_DLL_API  
   DomainException() : EsysException() {}  
   /**  
      \brief  
      Constructor for the exception.  
   */  
   ESCRIPT_DLL_API  
   DomainException(const char *cstr) : EsysException(cstr) {}  
   /**  
      \brief  
      Constructor for the exception.  
   */  
   ESCRIPT_DLL_API  
   DomainException(const std::string &str) : EsysException(str) {}  
39    
40    /// Destructor    public:
41    ESCRIPT_DLL_API      /**
42    virtual ~DomainException() throw() {}      \brief
43    /**      Default constructor for the exception.
44       \brief      */
45       Returns the name of the exception.      ESCRIPT_DLL_API
46    */      DomainException() : Parent() { updateMessage();}
47    ESCRIPT_DLL_API      /**
48    virtual std::string exceptionName() const {return "DomainException";}      \brief
49  };      Constructor for the exception.
50        */
51        ESCRIPT_DLL_API
52        DomainException(const char *cstr) : Parent(cstr) { updateMessage();}
53        /**
54        \brief
55        Constructor for the exception.
56        */
57        ESCRIPT_DLL_API
58        DomainException(const std::string &str) : Parent(str) { updateMessage();}
59        /**
60        \brief
61        Copy Constructor for the exception.
62        */
63        ESCRIPT_DLL_API
64        DomainException(const DomainException &other) : Parent(other)
65          {
66            updateMessage();
67          }
68    
69        /// Destructor
70        ESCRIPT_DLL_API
71        virtual ~DomainException() THROW() {}
72        /**
73        \brief
74        Returns the name of the exception.
75        */
76        ESCRIPT_DLL_API
77        virtual const std::string & exceptionName() const;
78    
79      private:
80    
81        //
82        // the exception name is immutable and class-wide.
83        // Inheritor note; you need one of these too.
84        // and an overloaded exceptionName() in your .cpp implementation file.
85        static const std::string exceptionNameValue;
86      };
87    
88  } // end of namespace  } // end of namespace
89  #endif  #endif

Legend:
Removed from v.1454  
changed lines
  Added in v.1455

  ViewVC Help
Powered by ViewVC 1.1.26