- GINAC_IMPLEMENT_REGISTERED_CLASS_NO_CTORS(classname, supername) \
-classname::classname(const classname & other) \
-{ \
- /*debugmsg(#classname " copy ctor", 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; \
-} \
-basic * classname::duplicate() const { \
- /*debugmsg(#classname " duplicate", LOGLEVEL_DUPLICATE);*/ \
- return new classname(*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);