ESYS13  Revision_
FinleyAdapterException.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  finley_FinleyAdapterException_20040526_H
00016 #define finley_FinleyAdapterException_20040526_H
00017 #include "system_dep.h"
00018 
00019 #include "esysUtils/EsysException.h"
00020 
00021 namespace finley
00022 {
00023 
00032   class FinleyAdapterException : public esysUtils::EsysException
00033   {
00034 
00035   protected:
00036 
00037      typedef EsysException Parent;
00038 
00039   public:
00044     FINLEY_DLL_API
00045     FinleyAdapterException() : Parent() { updateMessage();}
00050     FINLEY_DLL_API
00051     FinleyAdapterException(const char *cstr) : Parent(cstr) { updateMessage();}
00056     FINLEY_DLL_API
00057     FinleyAdapterException(const std::string &str) :
00058     Parent(str) { updateMessage();}
00063     FINLEY_DLL_API
00064     FinleyAdapterException(const FinleyAdapterException &other) : Parent(other)
00065       {
00066         updateMessage();
00067       }
00068 
00070     FINLEY_DLL_API
00071     virtual ~FinleyAdapterException() THROW(NO_ARG) {}
00072 
00077     FINLEY_DLL_API
00078     inline FinleyAdapterException &
00079     operator=(const FinleyAdapterException &other ) THROW(NO_ARG)
00080        {
00081          Parent::operator=(other);
00082          updateMessage();
00083          return *this;
00084        }
00085 
00090     FINLEY_DLL_API
00091     virtual const std::string & exceptionName() const;
00092 
00093   private:
00094 
00095     //
00096     // the exception name is immutable and class-wide.
00097     // Inheritor note; you need one of these too.
00098     // and an overloaded exceptionName() in your .cpp implementation file. 
00099     static const std::string exceptionNameValue;
00100   };
00101 
00102 } // end of namespace
00103 #endif