- GINAC_IMPLEMENT_REGISTERED_CLASS_NO_CTORS(classname, supername) \
-classname::~classname() \
-{ \
- debugmsg(#classname " destructor", LOGLEVEL_DESTRUCT); \
- destroy(false); \
-} \
-classname::classname(const classname & other) \
-{ \
- debugmsg(#classname " copy constructor", LOGLEVEL_CONSTRUCT); \
- copy(other); \
-} \
-const classname & classname::operator=(const classname & other) \
-{ \
- debugmsg(#classname " operator=", LOGLEVEL_ASSIGNMENT); \
- if (this != &other) { \
- destroy(true); \
- copy(other); \
- } \
- return *this; \
-}
+ GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)));
+
+/** Macro for inclusion in the implementation of each registered class.
+ * Additional options can be specified. */
+#define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(classname, supername, options) \
+ GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)).options);
+
+/** Macro for inclusion in the implementation of each registered class.
+ * Additional options can be specified. */
+#define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(classname, supername, options) \
+ GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)).options);