ESYS13  Revision_
SystemMatrixException.h
Go to the documentation of this file.
00001 
00002 /*******************************************************
00003 *
00004 * Copyright (c) 2003-2012 by University of Queensland
00005 * Earth Systems Science Computational Center (ESSCC)
00006 * http://www.uq.edu.au/esscc
00007 *
00008 * Primary Business: Queensland, Australia
00009 * Licensed under the Open Software License version 3.0
00010 * http://www.opensource.org/licenses/osl-3.0.php
00011 *
00012 *******************************************************/
00013 
00014 
00015 #if !defined  escript_SystemMatrixException_20040608_H
00016 #define escript_SystemMatrixException_20040608_H
00017 
00018 #include "system_dep.h"
00019 #include "esysUtils/EsysException.h"
00020 
00021 namespace escript
00022 {
00023 
00032   class SystemMatrixException : public esysUtils::EsysException
00033   {
00034 
00035   protected:
00036 
00037      typedef EsysException Parent;
00038 
00039   public:
00044     ESCRIPT_DLL_API
00045     SystemMatrixException() : Parent() { updateMessage();}
00050     ESCRIPT_DLL_API
00051     SystemMatrixException(const char *cstr) : Parent(cstr) { updateMessage();}
00056     ESCRIPT_DLL_API
00057     SystemMatrixException(const std::string &str) :
00058     Parent(str) { updateMessage();}
00063     ESCRIPT_DLL_API
00064     SystemMatrixException(const SystemMatrixException &other) : Parent(other)
00065       {
00066         updateMessage();
00067       }
00068 
00069     ESCRIPT_DLL_API
00070     inline SystemMatrixException &
00071     operator=(const SystemMatrixException &other ) THROW(NO_ARG)
00072        {
00073          Parent::operator=(other);
00074          updateMessage();
00075          return *this;
00076        }
00077 
00079     ESCRIPT_DLL_API
00080     virtual ~SystemMatrixException() THROW(NO_ARG) {}
00085     ESCRIPT_DLL_API
00086     virtual const std::string & exceptionName() const;
00087 
00088   private:
00089 
00090     //
00091     // the exception name is immutable and class-wide.
00092     // Inheritor note; you need one of these too.
00093     // and an overloaded exceptionName() in your .cpp implementation file. 
00094     static const std::string exceptionNameValue;
00095   };
00096 
00097 } // end of namespace
00098 #endif