X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fex.h;h=0de91a17dd414f0f19549b90bd3c52553c7b22e9;hp=de54e7c9cee14adfa183b193bd80dfcbbb19c8de;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c diff --git a/ginac/ex.h b/ginac/ex.h index de54e7c9..0de91a17 100644 --- a/ginac/ex.h +++ b/ginac/ex.h @@ -27,6 +27,8 @@ #include #include +namespace GiNaC { + class ex; class expand_options; class status_flags; @@ -63,7 +65,6 @@ public: #ifdef INLINE_EX_CONSTRUCTORS : bp(exZERO().bp) { - debugmsg("ex default constructor",LOGLEVEL_CONSTRUCT); ASSERT(exZERO().bp!=0); ASSERT(exZERO().bp->flags & status_flags::dynallocated); ASSERT(bp!=0); @@ -76,7 +77,6 @@ public: ~ex() #ifdef INLINE_EX_CONSTRUCTORS { - debugmsg("ex destructor",LOGLEVEL_DESTRUCT); ASSERT(bp!=0); ASSERT(bp->flags & status_flags::dynallocated); if (--bp->refcount == 0) { @@ -91,7 +91,6 @@ public: #ifdef INLINE_EX_CONSTRUCTORS : bp(other.bp) { - debugmsg("ex copy constructor",LOGLEVEL_CONSTRUCT); ASSERT(bp!=0); ASSERT((bp->flags) & status_flags::dynallocated); ++bp->refcount; @@ -103,7 +102,6 @@ public: ex const & operator=(ex const & other) #ifdef INLINE_EX_CONSTRUCTORS { - debugmsg("ex operator=",LOGLEVEL_ASSIGNMENT); ASSERT(bp!=0); ASSERT(bp->flags & status_flags::dynallocated); ASSERT(other.bp!=0); @@ -125,7 +123,6 @@ public: ex(basic const & other) #ifdef INLINE_EX_CONSTRUCTORS { - debugmsg("ex constructor from basic",LOGLEVEL_CONSTRUCT); construct_from_basic(other); } #else @@ -230,9 +227,14 @@ private: public: basic *bp; - }; +// utility functions +inline bool are_ex_trivially_equal(const ex &e1, const ex &e2) +{ + return e1.bp == e2.bp; +} + // wrapper functions around member functions inline int nops(ex const & thisex) { return thisex.nops(); } @@ -282,4 +284,6 @@ inline ex subs(ex const & thisex, lst const & ls, lst const & lr) inline void swap(ex & e1, ex & e2) { e1.swap(e2); } +} // namespace GiNaC + #endif // ndef __GINAC_EX_H__