]> www.ginac.de Git - ginac.git/blobdiff - ginac/ex.h
- Cleanups: My evil plot of making ex::bp private may finally be carried
[ginac.git] / ginac / ex.h
index fcba4588d1f994ccf436d7f67e554afdb520d1d7..e9f72bbee36dd501d29e5a86ec5a459368ca8118 100644 (file)
@@ -46,7 +46,11 @@ class scalar_products;
  *  a thing a proxy class.) */
 class ex
 {
-       friend class basic;
+       friend class archive_node;
+       friend bool are_ex_trivially_equal(const ex &, const ex &);
+       template<class T> friend const T &ex_to(const ex &);
+       template<class T> friend bool is_a(const ex &);
+       template<class T> friend bool is_exactly_a(const ex &);
        
 // member functions
        
@@ -70,12 +74,6 @@ public:
         *  symbols and other parser errors will throw an exception. */
        ex(const std::string &s, const ex &l);
        
-       // functions overriding virtual functions from bases classes
-       // none
-       
-       // new virtual functions which can be overridden by derived classes
-       // none
-
        // non-virtual functions in this class
 public:
        void swap(ex & other);
@@ -104,8 +102,8 @@ public:
        ex primpart(const symbol &x) const;
        ex primpart(const symbol &x, const ex &cont) const;
        ex normal(int level = 0) const;
-       ex to_rational(lst &repl_lst) const;
-       ex smod(const numeric &xi) const;
+       ex to_rational(lst &repl_lst) const { return bp->to_rational(repl_lst); }
+       ex smod(const numeric &xi) const { return bp->smod(xi); }
        numeric max_coefficient(void) const;
        ex collect(const ex & s, bool distributed = false) const { return bp->collect(s, distributed); }
        ex eval(int level = 0) const { return bp->eval(level); }
@@ -178,7 +176,7 @@ protected:
 // member variables
 
 public:
-       basic *bp;      ///< pointer to basic object managed by this
+       basic *bp;      ///< pointer to basic object managed by this, direct manipulation deprecated
 #ifdef OBSCURE_CINT_HACK
        static basic * last_created_or_assigned_bp;
        static basic * dummy_bp;