- * It implements some functions that are the same in all classes derived
- * from 'basic' (such as the destructor, the copy constructor and the
- * assignment operator). */
-#define GINAC_IMPLEMENT_REGISTERED_CLASS(classname, supername) \
- 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; \
-} \
-basic * classname::duplicate() const \
-{ \
- debugmsg(#classname " duplicate", LOGLEVEL_DUPLICATE); \
- return new classname(*this); \
-}
+ * 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, TINFO_##classname, &classname::unarchive).options);