]> www.ginac.de Git - ginac.git/blobdiff - ginac/fail.cpp
- changed old-style power() to new-style pow()
[ginac.git] / ginac / fail.cpp
index bc75c47e9b224b13230c2cde45b6728f88913d3f..9e8d8a6a52fe26a6098450a9fd5bc498fad15cb5 100644 (file)
@@ -4,7 +4,7 @@
  *  obsolete all this stuff ought to be replaced by exceptions. */
 
 /*
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  */
 
 #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
 //////////