libnebular::RawCExceptionLongJmp Class Reference
[Plugin API]

Assists when you need to "throw" C++ exception from below code compiled by C compiler. More...

#include <libnebular-plugin.hpp>

List of all members.

Public Member Functions

 RawCExceptionLongJmp (Loki::Functor< void > newCleanupCode=Loki::Functor< void >())
 ~RawCExceptionLongJmp ()
template<typename Return >
Return run (Loki::Functor< Return > code)
template<typename CurrException >
void doThrow (const CurrException &newException)

Detailed Description

Assists when you need to "throw" C++ exception from below code compiled by C compiler.

For code being argument of RawCExceptionLongJmp::run(): call to RawCExceptionLongJmp::doThrow() calls longjmp() to setjmp() been made at RawCExceptionLongJmp construction and there throw-s exception, which was an argument of RawCExceptionLongJmp::doThrow().

Remember that exceptions cannot unwind stack when there are functions compiled by C compiler.

Definition at line 252 of file libnebular-plugin.hpp.


Constructor & Destructor Documentation

libnebular::RawCExceptionLongJmp::RawCExceptionLongJmp ( Loki::Functor< void >  newCleanupCode = Loki::Functor< void >()  ) 
Parameters:
[in] newCleanupCode Called when there was call to doThrow() in code (so, in that case we may need some cleanup before performing real throw)

Definition at line 381 of file libnebular.cpp.

libnebular::RawCExceptionLongJmp::~RawCExceptionLongJmp (  ) 

Definition at line 388 of file libnebular.cpp.


Member Function Documentation

template<typename CurrException >
void libnebular::RawCExceptionLongJmp::doThrow ( const CurrException &  newException  )  [inline]
Parameters:
[in] newException Should be descendant of std::exception
See also:
RawCExceptionLongJmp

Definition at line 53 of file libnebular-plugin.templates.hpp.

template<typename Return >
Return libnebular::RawCExceptionLongJmp::run ( Loki::Functor< Return >  code  )  [inline]
Parameters:
[in] code Can call doThrow method of this object. (How code knows about which is that object? That's problem to solve by you.)

Definition at line 66 of file libnebular-plugin.templates.hpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun May 29 18:23:56 2011 for libnebular by  doxygen 1.6.3