added basic::get_precedence()
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 10 Apr 2001 18:30:21 +0000 (18:30 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 10 Apr 2001 18:30:21 +0000 (18:30 +0000)
ginac/basic.h

index a37e84dc46ed2f204386e885589e32f56c13fd13..9895902b5d85be488acf4c2a5a209254f81ca966 100644 (file)
@@ -146,10 +146,17 @@ public:
        const basic & hold(void) const;
        unsigned gethash(void) const { if (flags & status_flags::hash_calculated) return hashvalue; else return calchash(); }
        unsigned tinfo(void) const {return tinfo_key;}
+
        /** Set some status_flags. */
        const basic & setflag(unsigned f) const {flags |= f; return *this;}
+
        /** Clear some status_flags. */
        const basic & clearflag(unsigned f) const {flags &= ~f; return *this;}
+
+       /** Get relative precedence level (useful for implementing pretty-printed
+        *  output). */
+       unsigned get_precedence(void) const {return precedence;}
+
 protected:
        void ensure_if_modifiable(void) const;