Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

NSXException Class Reference

#include <NSXException.h>

List of all members.


Detailed Description

Main class & C++ wrapper object for ObjC NSException objects.

Definition at line 49 of file NSXException.h.

Public Methods

 NSXException (NSException *nsexception)
 Constructs the object with the ObjC exception to wrap.

NSException * nsexception () const
 Returns the enclosed ObjC exception.

void raise () const
 Raises the enclosed ObjC exception.

virtual const char * what () const throw ()
 Just returns the class name, like std::exception::what() does.


Static Public Methods

NSException * NSExceptionForException (const std::exception *cppException)
 Given a C++ std::exception object, will return an ObjC NSException object representing the exception.

void Raise (const std::exception *cppException)
 Morphs a C++ exception into an ObjC exception and raises it.

void Throw (NSException *objCException)
 Morphs an ObjC exception into a C++ exception and throws it.


Constructor & Destructor Documentation

NSXException::NSXException NSException *    nsexception [inline]
 

Constructs the object with the ObjC exception to wrap.

Definition at line 52 of file NSXException.h.

References nsexception().

Referenced by Throw().


Member Function Documentation

NSException* NSXException::nsexception   const [inline]
 

Returns the enclosed ObjC exception.

Definition at line 58 of file NSXException.h.

Referenced by NSExceptionForException(), and NSXException().

NSException* NSXException::NSExceptionForException const std::exception *    cppException [inline, static]
 

Given a C++ std::exception object, will return an ObjC NSException object representing the exception.

Is smart in that it looks at the exception and will simply "unwrap" it if it's a C++-wrapper ObjC NSException already. I call this "morphing", and it's lossless.

Parameters:
cppException  Required pointer to C++ exception.
Returns :
the ObjC NSException object

Definition at line 87 of file NSXException.h.

References nsexception().

Referenced by NSXRaisingDestructor::arm(), and Raise().

void NSXException::Raise const std::exception *    cppException [inline, static]
 

Morphs a C++ exception into an ObjC exception and raises it.

Parameters:
cppException  Required pointer to C++ exception.

Definition at line 117 of file NSXException.h.

References NSExceptionForException(), and raise().

void NSXException::raise   const [inline]
 

Raises the enclosed ObjC exception.

Definition at line 63 of file NSXException.h.

References raise().

Referenced by Raise(), and raise().

void NSXException::Throw NSException *    objCException [inline, static]
 

Morphs an ObjC exception into a C++ exception and throws it.

Parameters:
objCException  Required pointer to ObjC NSException exception.

Definition at line 132 of file NSXException.h.

References NSXException().

virtual const char* NSXException::what   const throw () [inline, virtual]
 

Just returns the class name, like std::exception::what() does.

Definition at line 70 of file NSXException.h.


The documentation for this class was generated from the following file:
Generated on Wed Mar 5 09:57:47 2003 for TempFile by doxygen1.2.17