Improved doc.
[libsex.git] / include / libsex / macros.hxx
blob270c2f88b74936bf9dda8600ee0f4aad61158418
1 #ifndef LIBSEX_MACROS_HXX
2 #define LIBSEX_MACROS_HXX
4 /// Macro for declaring exception classes (.hxx).
5 #define LIBSEX_DECLARE(parent, name) \
6 class name : public parent\
7 {\
8 public:\
9 static const char* const TEMPLATE;\
10 name(const char* const errorMessage);\
13 /// Macro for defining exception classes (.cxx).
14 #define LIBSEX_DEFINE(parent, name, message) \
15 const char* const name::TEMPLATE = message;\
17 name::name(const char* const errorMessage)\
18 : parent(errorMessage)\
22 #endif