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

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

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

revision 474 by jgs, Mon Jan 30 04:23:44 2006 UTC revision 1455 by phornby, Thu Feb 28 17:19:44 2008 UTC
# Line 1  Line 1 
1  /*  
2   *****************************************************************************  /* $Id$ */
3   *                                                                           *  
4   *       COPYRIGHT  ACcESS  -  All Rights Reserved                           *  /*******************************************************
5   *                                                                           *   *
6   * This software is the property of ACcESS. No part of this code             *   *           Copyright 2003-2007 by ACceSS MNRF
7   * may be copied in any form or by any means without the expressed written   *   *       Copyright 2007 by University of Queensland
8   * consent of ACcESS.  Copying, use or modification of this software         *   *
9   * by any unauthorised person is illegal unless that person has a software   *   *                http://esscc.uq.edu.au
10   * license agreement with ACcESS.                                            *   *        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  #if !defined  escript_DataException_20040324_H  #if !defined  escript_DataException_20040324_H
17  #define escript_DataException_20040324_H  #define escript_DataException_20040324_H
18    #include "system_dep.h"
19    
20  #include "EsysException.h"  #include "esysUtils/EsysException.h"
21    
22  #include <string>  namespace escript
23    {
24    
25  namespace escript {    /**
26      \brief
27      DataException exception class.
28    
29  /**    Description:
30     \brief    DataException exception class.
31     DataException exception class.    The class provides a public function returning the exception name
32      */
33      class DataException : public esysUtils::EsysException
34      {
35    
36     Description:    protected:
    DataException exception class.  
    The class provides a public function returning the exception name  
 */  
 class DataException:public esysUtils::EsysException {  
37    
38   public:       typedef EsysException Parent;
39    /**  
40       \brief    public:
41       Default constructor for the exception.      /**
42    */      \brief
43    DataException() : esysUtils::EsysException() {}      Default constructor for the exception.
44    /**      */
45       \brief      ESCRIPT_DLL_API
46       Constructor for the exception.      DataException() : Parent() { updateMessage();}
47    */      /**
48    DataException(const char *cstr) : esysUtils::EsysException(cstr) {}      \brief
49    /**      Constructor for the exception.
50       \brief      */
51       Constructor for the exception.      ESCRIPT_DLL_API
52    */      DataException(const char *cstr) : Parent(cstr) { updateMessage();}
53    DataException(const std::string &str) : esysUtils::EsysException(str) {}      /**
54    /**      \brief
55       \brief      Constructor for the exception.
56       Returns the name of the exception.      */
57    */      ESCRIPT_DLL_API
58    virtual std::string exceptionName() const {return "DataException";}      DataException(const std::string &str) : Parent(str) { updateMessage();}
59  };      /**
60        \brief
61        Copy Constructor for the exception.
62        */
63        ESCRIPT_DLL_API
64        DataException(const DataException &other) : Parent(other)
65          {
66            updateMessage();
67          }
68    
69    
70        /// Destructor
71        ESCRIPT_DLL_API
72        virtual ~DataException() THROW() {}
73    
74        /**
75        \brief
76        Returns the name of the exception.
77        */
78        ESCRIPT_DLL_API
79        virtual const std::string & exceptionName() const;
80    
81      private:
82    
83        //
84        // the exception name is immutable and class-wide.
85        // Inheritor note; you need one of these too.
86        // and an overloaded exceptionName() in your .cpp implementation file.
87        static const std::string exceptionNameValue;
88    
89    
90      };
91    
92  } // end of namespace  } // end of namespace
93    
94    
95  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.26