]> www.ginac.de Git - ginac.git/blobdiff - ginac/power.h
Univariate Hensel lifting now uses upoly.
[ginac.git] / ginac / power.h
index 5c59ee7fef6679507e63aa996717aa8805c04a07..4a22ef445c151787361494bf8adebac4d7ddd491 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "basic.h"
 #include "ex.h"
+#include "archive.h"
 
 namespace GiNaC {
 
@@ -44,8 +45,8 @@ class power : public basic
        
        // other constructors
 public:
-       power(const ex & lh, const ex & rh) : inherited(&power::tinfo_static), basis(lh), exponent(rh) {}
-       template<typename T> power(const ex & lh, const T & rh) : inherited(&power::tinfo_static), basis(lh), exponent(rh) {}
+       power(const ex & lh, const ex & rh) :  basis(lh), exponent(rh) {}
+       template<typename T> power(const ex & lh, const T & rh) :  basis(lh), exponent(rh) {}
        
        // functions overriding virtual functions from base classes
 public:
@@ -70,11 +71,15 @@ public:
        ex conjugate() const;
        ex real_part() const;
        ex imag_part() const;
+       /** Save (a.k.a. serialize) object into archive. */
+       void archive(archive_node& n) const;
+       /** Read (a.k.a. deserialize) object from archive. */
+       void read_archive(const archive_node& n, lst& syms);
 protected:
        ex derivative(const symbol & s) const;
        ex eval_ncmul(const exvector & v) const;
        unsigned return_type() const;
-       tinfo_t return_type_tinfo() const;
+       return_type_t return_type_tinfo() const;
        ex expand(unsigned options = 0) const;
        
        // new virtual functions which can be overridden by derived classes
@@ -100,6 +105,7 @@ protected:
        ex basis;
        ex exponent;
 };
+GINAC_DECLARE_UNARCHIVER(power); 
 
 // wrapper functions