]> www.ginac.de Git - ginac.git/blobdiff - ginac/container.pl
replaced "precedence" static member variable by virtual precedence() function
[ginac.git] / ginac / container.pl
index af9d5372ba4616cb441ed5c399a090c776fd490c..8a025033a76a62f3f2f0e9571c5b3ba47bbf25e7 100755 (executable)
@@ -206,6 +206,7 @@ ${constructors_interface}
 
 public:
        void print(const print_context & c, unsigned level = 0) const;
+       unsigned precedence(void) const {return 10;}
        bool info(unsigned inf) const;
        unsigned nops() const;
        ex & let_op(int i);
@@ -241,7 +242,6 @@ protected:
 
 protected:
        ${STLT} seq;
-       static unsigned precedence;
 };
 
 // utility functions
@@ -418,7 +418,7 @@ void ${CONTAINER}::print(const print_context & c, unsigned level) const
 
        } else {
                // always print brackets around seq, ignore upper_precedence
-               printseq(c, '${open_bracket}', ',', '${close_bracket}', precedence, precedence+1);
+               printseq(c, '${open_bracket}', ',', '${close_bracket}', precedence(), precedence()+1);
        }
 }
 
@@ -726,14 +726,6 @@ ${STLT} * ${CONTAINER}::subschildren(const lst & ls, const lst & lr) const
        return 0; // nothing has changed
 }
 
-//////////
-// static member variables
-//////////
-
-// protected
-
-unsigned ${CONTAINER}::precedence = 10;
-
 } // namespace GiNaC
 
 END_OF_IMPLEMENTATION