invalid_cast_exception.h

00001 //--------------------------------------------------
00013 //---------------------------------------------------
00014 
00015 #ifndef IMEDGINEINVALID_CAST_EXCEPTION_H
00016 #define IMEDGINEINVALID_CAST_EXCEPTION_H
00017 
00018 #include "exception.h"
00019 #include <string>
00020 
00021 namespace imedgine 
00022 {
00023   //--------------------------------------------------
00036   //--------------------------------------------------
00037 
00038 
00039   class InvalidCastException : public Exception
00040   {
00041   public:
00042     
00043     //--------------------------------------------------
00049     
00050     InvalidCastException(std::string method, 
00051                          std::string source_type_string, 
00052                          std::string target_type_string);
00053     
00054     //--------------------------------------------------
00057     
00058     InvalidCastException(InvalidCastException const& src);
00059 
00060     //--------------------------------------------------
00063     
00064     virtual ~InvalidCastException() throw();
00065     
00066     //--------------------------------------------------
00070     
00071     virtual char const* what() const throw();
00072     
00073     //--------------------------------------------------
00077     std::string const& getSourceTypeString() const;
00078     
00079     //--------------------------------------------------
00083     
00084     std::string const& getTargetTypeString() const;
00085     
00086   protected:
00087       
00088     //--------------------------------------------------
00091     std::string source_type_string_;
00092     
00093     //--------------------------------------------------
00096     std::string target_type_string_;
00097     
00098   private:
00099 
00100     InvalidCastException& operator = (InvalidCastException const&) 
00101     { return(*this); }
00102   };
00103 }
00104 
00105 #endif

Generated on Sun Aug 13 18:19:39 2006 for iMEDgine by  doxygen 1.4.6