#include "ex.h"
#include "add.h"
#include "mul.h"
+#include "archive.h"
#include "debugmsg.h"
#include "utils.h"
namespace GiNaC {
#endif // ndef NO_GINAC_NAMESPACE
+GINAC_IMPLEMENT_REGISTERED_CLASS(ncmul, exprseq)
+
//////////
// default constructor, destructor, copy constructor assignment operator and helpers
//////////
void ncmul::copy(ncmul const & other)
{
- exprseq::copy(other);
+ inherited::copy(other);
}
void ncmul::destroy(bool call_parent)
{
- if (call_parent) exprseq::destroy(call_parent);
+ if (call_parent) inherited::destroy(call_parent);
}
//////////
// public
ncmul::ncmul(ex const & lh, ex const & rh) :
- exprseq(lh,rh)
+ inherited(lh,rh)
{
debugmsg("ncmul constructor from ex,ex",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
}
ncmul::ncmul(ex const & f1, ex const & f2, ex const & f3) :
- exprseq(f1,f2,f3)
+ inherited(f1,f2,f3)
{
debugmsg("ncmul constructor from 3 ex",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
}
ncmul::ncmul(ex const & f1, ex const & f2, ex const & f3,
- ex const & f4) : exprseq(f1,f2,f3,f4)
+ ex const & f4) : inherited(f1,f2,f3,f4)
{
debugmsg("ncmul constructor from 4 ex",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
}
ncmul::ncmul(ex const & f1, ex const & f2, ex const & f3,
- ex const & f4, ex const & f5) : exprseq(f1,f2,f3,f4,f5)
+ ex const & f4, ex const & f5) : inherited(f1,f2,f3,f4,f5)
{
debugmsg("ncmul constructor from 5 ex",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
ncmul::ncmul(ex const & f1, ex const & f2, ex const & f3,
ex const & f4, ex const & f5, ex const & f6) :
- exprseq(f1,f2,f3,f4,f5,f6)
+ inherited(f1,f2,f3,f4,f5,f6)
{
debugmsg("ncmul constructor from 6 ex",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
}
-ncmul::ncmul(exvector const & v, bool discardable) : exprseq(v,discardable)
+ncmul::ncmul(exvector const & v, bool discardable) : inherited(v,discardable)
{
debugmsg("ncmul constructor from exvector,bool",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
}
-ncmul::ncmul(exvector * vp) : exprseq(vp)
+ncmul::ncmul(exvector * vp) : inherited(vp)
{
debugmsg("ncmul constructor from exvector *",LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_ncmul;
}
+
+//////////
+// archiving
+//////////
+
+/** Construct object from archive_node. */
+ncmul::ncmul(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
+{
+ debugmsg("ncmul constructor from archive_node", LOGLEVEL_CONSTRUCT);
+}
+
+/** Unarchive the object. */
+ex ncmul::unarchive(const archive_node &n, const lst &sym_lst)
+{
+ return (new ncmul(n, sym_lst))->setflag(status_flags::dynallocated);
+}
+
+/** Archive the object. */
+void ncmul::archive(archive_node &n) const
+{
+ inherited::archive(n);
+}
+
//////////
// functions overriding virtual functions from bases classes
int ncmul::compare_same_type(basic const & other) const
{
- return exprseq::compare_same_type(other);
+ return inherited::compare_same_type(other);
}
unsigned ncmul::return_type(void) const