libthrowable::ThrowableType< ThrowableT, TagT > Class Template Reference
[Exception handling]

Use this template to derive new throwable classes within seconds. More...

#include <libthrowable/throwable_type.h>

Inheritance diagram for libthrowable::ThrowableType< ThrowableT, TagT >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ThrowableType () throw ()
 ThrowableType (const std::string &msg) throw ()
 ThrowableType (const char *filename, int linenumber) throw ()
 ThrowableType (const char *filename, int linenumber, const char *function) throw ()
 ThrowableType (const char *filename, int linenumber, const std::string &msg) throw ()
 ThrowableType (const char *filename, int linenumber, const char *function, const std::string &msg) throw ()
 ThrowableType (const std::exception &cause) throw ()
 ThrowableType (const std::exception &cause, const std::string &msg) throw ()
 ThrowableType (const char *filename, int linenumber, const std::exception &cause) throw ()
 ThrowableType (const char *filename, int linenumber, const char *function, const std::exception &cause) throw ()
 ThrowableType (const char *filename, int linenumber, const char *function, const std::exception &cause, const std::string &msg) throw ()
virtual ~ThrowableType () throw ()

Protected Member Functions

 ThrowableType (const std::string &msg, const typename ThrowableT::DontManipulateStr &dummy) throw ()


Detailed Description

template<class ThrowableT, class TagT>
class libthrowable::ThrowableType< ThrowableT, TagT >

Use this template to derive new throwable classes within seconds.

Parameters:
ThrowableT a type that has a constructor that is compatible with ThrowableT::ThrowableT(const std::string&, const ThrowableT::DontManipulateStr&). Most likely this will be a class like Throwable, Exception or Error.
TagT a tag type with a static name() method, that returns a (const) string (reference).
Note:
Suppose you want to have a new Error class named Meltdown. You should do that like this:
        #include <libthrowable/error.h>
        using namespace libthrowable;
        struct MeltdownTag
        {
            static const std::string& name()
            {
                static const std::string ret("Meltdown");
                return ret;
            }
        };
        typedef ThrowableType<Error, MeltdownTag> Meltdown;
See also:
UserFaultType

Constructor & Destructor Documentation

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType (  )  throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const std::string &  msg  )  throw () [inline, explicit]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber,
const char *  function 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber,
const std::string &  msg 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber,
const char *  function,
const std::string &  msg 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const std::exception &  cause  )  throw () [inline, explicit]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const std::exception &  cause,
const std::string &  msg 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber,
const std::exception &  cause 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber,
const char *  function,
const std::exception &  cause 
) throw () [inline]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const char *  filename,
int  linenumber,
const char *  function,
const std::exception &  cause,
const std::string &  msg 
) throw () [inline]

template<class ThrowableT, class TagT>
virtual libthrowable::ThrowableType< ThrowableT, TagT >::~ThrowableType (  )  throw () [inline, virtual]

template<class ThrowableT, class TagT>
libthrowable::ThrowableType< ThrowableT, TagT >::ThrowableType ( const std::string &  msg,
const typename ThrowableT::DontManipulateStr &  dummy 
) throw () [inline, protected]


The documentation for this class was generated from the following file:
Generated on Wed Jan 9 18:07:18 2008 for libthrowable by  doxygen 1.5.4  Hosted on  SourceForge.net Logo