escript  Revision_
TransportProblemException.h
Go to the documentation of this file.
00001 
00002 /*****************************************************************************
00003 *
00004 * Copyright (c) 2003-2014 by University of Queensland
00005 * http://www.uq.edu.au
00006 *
00007 * Primary Business: Queensland, Australia
00008 * Licensed under the Open Software License version 3.0
00009 * http://www.opensource.org/licenses/osl-3.0.php
00010 *
00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
00012 * Development 2012-2013 by School of Earth Sciences
00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
00014 *
00015 *****************************************************************************/
00016 
00017 
00018 #if !defined  escript_TransportProblemException_20040608_H
00019 #define escript_TransportProblemException_20040608_H
00020 
00021 #include "system_dep.h"
00022 #include "esysUtils/EsysException.h"
00023 
00024 namespace escript
00025 {
00026 
00035   class TransportProblemException : public esysUtils::EsysException {
00036 
00037   protected:
00038 
00039      typedef EsysException Parent;
00040 
00041   public:
00046     ESCRIPT_DLL_API
00047     TransportProblemException() : Parent() { updateMessage();}
00052     ESCRIPT_DLL_API
00053     TransportProblemException(const char *cstr) :
00054     Parent(cstr) { updateMessage();}
00059     ESCRIPT_DLL_API
00060     TransportProblemException(const std::string &str) :
00061     Parent(str) { updateMessage();}
00066     ESCRIPT_DLL_API
00067     TransportProblemException(const TransportProblemException &other) :
00068     Parent(other)
00069       {
00070         updateMessage();
00071       }
00072 
00073     ESCRIPT_DLL_API
00074     inline TransportProblemException &
00075     operator=(const TransportProblemException &other ) THROW(NO_ARG)
00076        {
00077          Parent::operator=(other);
00078          updateMessage();
00079          return *this;
00080        }
00081 
00083     ESCRIPT_DLL_API
00084     virtual ~TransportProblemException() THROW(NO_ARG) {}
00089     ESCRIPT_DLL_API
00090     virtual const std::string & exceptionName() const;
00091 
00092   private:
00093 
00094     //
00095     // the exception name is immutable and class-wide.
00096     // Inheritor note; you need one of these too.
00097     // and an overloaded exceptionName() in your .cpp implementation file. 
00098     static const std::string exceptionNameValue;
00099   };
00100 
00101 } // end of namespace
00102 
00103 #endif