InvalidCastException Class Reference
[Exceptions]

Exception for invalid dynamic casts. More...

#include <invalid_cast_exception.h>

Inherits Exception.

Inheritance diagram for InvalidCastException:

Inheritance graph
[legend]
Collaboration diagram for InvalidCastException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InvalidCastException (std::string method, std::string source_type_string, std::string target_type_string)
 InvalidCastException (InvalidCastException const &src)
virtual ~InvalidCastException () throw ()
virtual char const * what () const throw ()
std::string const & getSourceTypeString () const
std::string const & getTargetTypeString () const

Protected Attributes

std::string source_type_string_
std::string target_type_string_

Detailed Description

Exception for invalid dynamic casts.

This exception is thrown if a dynamic cast fails

Author:
Tobias Gross (tobias.gross@imedgine.org)

Christian Koerner (christian.koerner@imedgine.org)

Alexander Lex (alexander.lex@imedgine.org)

Marc Streit (marc.streit@imedgine.org)

Martin Reininger (martin.reininger@imedgine.org)

Definition at line 39 of file invalid_cast_exception.h.


Constructor & Destructor Documentation

InvalidCastException std::string  method,
std::string  source_type_string,
std::string  target_type_string
 

Constructor

Parameters:
method The name of the method where the exception occured
source_type_string The name of the source type of the cast
target_type_string The name of the target type of the cast

Definition at line 20 of file invalid_cast_exception.cpp.

InvalidCastException InvalidCastException const &  src  ) 
 

Copy constructor

Definition at line 28 of file invalid_cast_exception.cpp.

~InvalidCastException  )  throw () [virtual]
 

Destructor

Definition at line 35 of file invalid_cast_exception.cpp.


Member Function Documentation

std::string const & getSourceTypeString  )  const
 

Returb the source type of the cast that failed

Returns:
The source type of the cast that failed

Definition at line 48 of file invalid_cast_exception.cpp.

References InvalidCastException::source_type_string_.

std::string const & getTargetTypeString  )  const
 

Return the target type of the cast that failed

Returns:
The target type of the cast that failed

Definition at line 55 of file invalid_cast_exception.cpp.

References InvalidCastException::target_type_string_.

char const * what  )  const throw () [virtual]
 

Emit a short description of the exception

Returns:
A short description

Reimplemented from Exception.

Definition at line 41 of file invalid_cast_exception.cpp.


Member Data Documentation

std::string source_type_string_ [protected]
 

The source type of the cast that failed

Definition at line 91 of file invalid_cast_exception.h.

Referenced by InvalidCastException::getSourceTypeString().

std::string target_type_string_ [protected]
 

The target type of the cast that failed

Definition at line 96 of file invalid_cast_exception.h.

Referenced by InvalidCastException::getTargetTypeString().


The documentation for this class was generated from the following files:
Generated on Sun Aug 13 18:20:04 2006 for iMEDgine by  doxygen 1.4.6