X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fstructure.pl;h=1455825c1ecc598097dfcf275f3213173d933d55;hb=85ce9664ddba79c28a6945b1e5b4e2b71f77cb51;hp=e46bf4b2bd3d2224f32acfe6ddab7c5be1dec9ef;hpb=4e3a4ac2bcb0837611ea31bc8fc05d84a20c33ac;p=ginac.git diff --git a/ginac/structure.pl b/ginac/structure.pl index e46bf4b2..1455825c 100755 --- a/ginac/structure.pl +++ b/ginac/structure.pl @@ -173,9 +173,7 @@ public: // functions overriding virtual functions from bases classes public: basic * duplicate() const; - void printraw(ostream & os) const; - void print(ostream & os, unsigned upper_precedence=0) const; - void printtree(ostream & os, unsigned indent) const; + void print(const print_context & c, unsigned level = 0) const; int nops() const; ex & let_op(int i); ex expand(unsigned options=0) const; @@ -253,6 +251,7 @@ ${input_structure} #include #include "${STRUCTURE}.h" +#include "print.h" namespace GiNaC { @@ -328,22 +327,10 @@ basic * ${STRUCTURE}::duplicate() const return new ${STRUCTURE}(*this); } -void ${STRUCTURE}::printraw(ostream & os) const +void ${STRUCTURE}::print(const print_context & c, unsigned level) const { - debugmsg("${STRUCTURE} printraw",LOGLEVEL_PRINT); - os << "${STRUCTURE}()"; -} - -void ${STRUCTURE}::print(ostream & os, unsigned upper_precedence) const -{ - debugmsg("${STRUCTURE} print",LOGLEVEL_PRINT); - os << "${STRUCTURE}()"; -} - -void ${STRUCTURE}::printtree(ostream & os, unsigned indent) const -{ - debugmsg("${STRUCTURE} printtree",LOGLEVEL_PRINT); - os << "${STRUCTURE}()"; + debugmsg("${STRUCTURE} print", LOGLEVEL_PRINT); + c.s << class_name() << "()"; } int ${STRUCTURE}::nops() const