X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Farchive.h;h=396820b392a7fc58f4ee4b77432b059c14cab0ad;hb=bdbc7bc10fcefdc000fd532280679d8e57b36795;hp=a2db1666417070fad8a738cc6e3b988ef5b3ca0b;hpb=0a1b35cf1e59c9e3aae33de8febaa1c8f4bbe630;p=ginac.git diff --git a/ginac/archive.h b/ginac/archive.h index a2db1666..396820b3 100644 --- a/ginac/archive.h +++ b/ginac/archive.h @@ -3,7 +3,7 @@ * Archiving of GiNaC expressions. */ /* - * 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 @@ -23,7 +23,7 @@ #ifndef __GINAC_ARCHIVE_H__ #define __GINAC_ARCHIVE_H__ -#include +#include "ex.h" #include #include @@ -31,9 +31,9 @@ class ostream; class istream; -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC class lst; class archive; @@ -55,6 +55,7 @@ class archive_node friend istream &operator>>(istream &is, archive_node &ar); public: + archive_node() : a(*dummy_ar_creator()), has_expression(false) {} // hack for cint which always requires a default constructor archive_node(archive &ar) : a(ar), has_expression(false) {} archive_node(archive &ar, const ex &expr); ~archive_node() {} @@ -77,9 +78,11 @@ public: ex unarchive(const lst &sym_lst) const; void forget(void); - void dump(ostream &os) const; + void printraw(ostream &os) const; private: + static archive* dummy_ar_creator(void); + /** Property data types */ enum property_type { PTYPE_BOOL, @@ -150,7 +153,7 @@ public: void clear(void); void forget(void); - void dump(ostream &os) const; + void printraw(ostream &os) const; private: /** Vector of archived nodes. */ @@ -182,8 +185,8 @@ ostream &operator<<(ostream &os, const archive &ar); istream &operator>>(istream &is, archive &ar); -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_ARCHIVE_H__