]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.h
Don't force every algebraic class to implement archiving/unarchiving.
[ginac.git] / ginac / indexed.h
index 82a45c3441b4e8390b5624e72e2ca49446bad780..b5339a7e34005d47ff52554d9a4666c8c38075c7 100644 (file)
@@ -151,6 +151,10 @@ public:
        ex imag_part() const;
        exvector get_free_indices() const;
 
+       /** Save (a.k.a. serialize) indexed object into archive. */
+       void archive(archive_node& n) const;
+       /** Read (a.k.a. deserialize) indexed object from archive. */
+       void read_archive(const archive_node& n, lst& syms);
 protected:
        ex derivative(const symbol & s) const;
        ex thiscontainer(const exvector & v) const;
@@ -198,6 +202,7 @@ protected:
 protected:
        ex symtree; /**< Index symmetry (tree of symmetry objects) */
 };
+GINAC_DECLARE_UNARCHIVER(indexed);
 
 
 class spmapkey {