X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffail.cpp;h=9e8d8a6a52fe26a6098450a9fd5bc498fad15cb5;hp=395b1189c6a981e58b7e77d6429d9f7906e6c949;hb=0a1b35cf1e59c9e3aae33de8febaa1c8f4bbe630;hpb=5de2047da59ab541288dd8383fd8eed55e6dfd1c diff --git a/ginac/fail.cpp b/ginac/fail.cpp index 395b1189..9e8d8a6a 100644 --- a/ginac/fail.cpp +++ b/ginac/fail.cpp @@ -22,19 +22,22 @@ */ #include "fail.h" +#include "archive.h" #include "debugmsg.h" #ifndef NO_GINAC_NAMESPACE namespace GiNaC { #endif // ndef NO_GINAC_NAMESPACE +GINAC_IMPLEMENT_REGISTERED_CLASS(fail, basic) + ////////// // default constructor, destructor, copy constructor assignment operator and helpers ////////// // public -fail::fail() : basic(TINFO_fail) +fail::fail() : inherited(TINFO_fail) { debugmsg("fail default constructor",LOGLEVEL_CONSTRUCT); } @@ -65,12 +68,12 @@ fail const & fail::operator=(fail const & other) void fail::copy(fail const & other) { - basic::copy(other); + inherited::copy(other); } void fail::destroy(bool call_parent) { - if (call_parent) basic::destroy(call_parent); + if (call_parent) inherited::destroy(call_parent); } @@ -80,6 +83,28 @@ void fail::destroy(bool call_parent) // none +////////// +// archiving +////////// + +/** Construct object from archive_node. */ +fail::fail(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) +{ + debugmsg("fail constructor from archive_node", LOGLEVEL_CONSTRUCT); +} + +/** Unarchive the object. */ +ex fail::unarchive(const archive_node &n, const lst &sym_lst) +{ + return (new fail(n, sym_lst))->setflag(status_flags::dynallocated); +} + +/** Archive the object. */ +void fail::archive(archive_node &n) const +{ + inherited::archive(n); +} + ////////// // functions overriding virtual functions from bases classes //////////