From a8030df4915df6a1ea0312cbffb79ace4795c865 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Tue, 10 Apr 2001 18:30:21 +0000 Subject: [PATCH 1/1] added basic::get_precedence() --- ginac/basic.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ginac/basic.h b/ginac/basic.h index a37e84dc..9895902b 100644 --- a/ginac/basic.h +++ b/ginac/basic.h @@ -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; -- 2.44.0