4 * Macro @ref LIBSEX_DECLARE.
7 #ifndef LIBSEX_DECLARE_HXX
8 #define LIBSEX_DECLARE_HXX
10 #include <libsex/Exception.hxx>
13 * Declares an exception inheriting from a supplied class.
15 * @note Due to technical limitations, it is not possible
16 * to use LIBSEX_DECLARE to declare a class in global
17 * scope. However, in a truly modular system that would be
18 * bad practice anyways, so I don't care.
20 * @param parent Parent class (incl. scope).
21 * @param scope Non-global scope of class to be defined.
22 * @param name Name of class to be defined.
25 #define LIBSEX_DECLARE(parent, scope, name) \
26 class scope::name : public parent\
29 static const char* const TEMPLATE;\
30 name(const char* const errorMessage);\
32 const char* const errorMessage,\
33 const libsex::Exception& previous);\