/[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

trunk/escript/src/Data/DomainException.h revision 468 by jgs, Wed Jan 25 06:50:39 2006 UTC trunk/escript/src/DomainException.h revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC
# Line 1  Line 1 
1  /*  
2   *****************************************************************************  /*******************************************************
3   *                                                                           *  *
4   *       COPYRIGHT  ACcESS  -  All Rights Reserved                           *  * Copyright (c) 2003-2008 by University of Queensland
5   *                                                                           *  * Earth Systems Science Computational Center (ESSCC)
6   * This software is the property of ACcESS. No part of this code             *  * http://www.uq.edu.au/esscc
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         *  * Primary Business: Queensland, Australia
9   * by any unauthorised person is illegal unless that person has a software   *  * Licensed under the Open Software License version 3.0
10   * license agreement with ACcESS.                                            *  * http://www.opensource.org/licenses/osl-3.0.php
11   *                                                                           *  *
12   *****************************************************************************  *******************************************************/
13  */  
14                                                                              
15  #if !defined  escript_DomainException_20040608_H  #if !defined  escript_DomainException_20040608_H
16  #define escript_DomainException_20040608_H  #define escript_DomainException_20040608_H
17    #include "system_dep.h"
18    
19  #include "EsysException.h"  #include "esysUtils/EsysException.h"
 #include <string>  
   
 namespace escript {  
20    
21  /**  namespace escript
22     \brief  {
    DomainException exception class.  
   
    Description:  
    DomainException exception class.  
    The class provides a public function returning the exception name  
 */  
 class DomainException:public esysUtils::EsysException {  
23    
  public:  
   /**  
      \brief  
      Default constructor for the exception.  
   */  
   DomainException() : EsysException() {}  
   /**  
      \brief  
      Constructor for the exception.  
   */  
   DomainException(const char *cstr) : EsysException(cstr) {}  
   /**  
      \brief  
      Constructor for the exception.  
   */  
   DomainException(const std::string &str) : EsysException(str) {}  
24    /**    /**
25       \brief    \brief
26       Returns the name of the exception.    DomainException exception class.
27    
28      Description:
29      DomainException exception class.
30      The class provides a public function returning the exception name
31    */    */
32    virtual std::string exceptionName() const {return "DomainException";}    class DomainException : public esysUtils::EsysException
33  };    {
34    
35      protected:
36    
37        typedef EsysException Parent;
38    
39      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    
68        ESCRIPT_DLL_API
69        inline virtual DomainException &
70        operator=(const DomainException &other ) THROW_ANY
71           {
72             Parent::operator=(other);
73             updateMessage();
74             return *this;
75           }
76    
77        /// Destructor
78        ESCRIPT_DLL_API
79        virtual ~DomainException() THROW_ANY {}
80        /**
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  } // end of namespace  } // end of namespace
97  #endif  #endif

Legend:
Removed from v.468  
changed lines
  Added in v.1811

  ViewVC Help
Powered by ViewVC 1.1.26