X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fconstant.h;h=efbe39e9d9beef52c4d7814b0f736c48206eb357;hp=c18f6fc9f01dd2669a08a3013067a8028587d364;hb=3f0b0165865bbb297901e9542fced88a0e32298e;hpb=7d870583a6bf21a2ffb7b6f051b702064623892e diff --git a/ginac/constant.h b/ginac/constant.h index c18f6fc9..efbe39e9 100644 --- a/ginac/constant.h +++ b/ginac/constant.h @@ -26,6 +26,7 @@ #include #include "basic.h" #include "ex.h" +#include "archive.h" namespace GiNaC { @@ -38,9 +39,6 @@ typedef ex (*evalffunctype)(); class constant : public basic { GINAC_DECLARE_REGISTERED_CLASS(constant, basic) - -// member functions - // other constructors public: constant(const std::string & initname, evalffunctype efun = 0, const std::string & texname = std::string(), unsigned domain = domain::complex); @@ -54,6 +52,8 @@ public: ex conjugate() const; ex real_part() const; ex imag_part() const; + void archive(archive_node& n) const; + void read_archive(const archive_node& n, lst& syms); protected: ex derivative(const symbol & s) const; bool is_equal_same_type(const basic & other) const; @@ -76,6 +76,7 @@ private: static unsigned next_serial; unsigned domain; ///< numerical value this constant evalf()s to }; +GINAC_DECLARE_UNARCHIVER(constant); extern const constant Pi; extern const constant Catalan;