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