X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fcontainer.pl;h=d187d0654d6973076b9bacc2431d732678b73d53;hb=09f37bdbd46f469b3a8a902a43d0f795c41a89bf;hp=8004383a3a1d995b59a022ca3bc391192a6dead5;hpb=d448856f20cb58f939ddbf636e7f72e3599b1468;p=ginac.git diff --git a/ginac/container.pl b/ginac/container.pl index 8004383a..d187d065 100755 --- a/ginac/container.pl +++ b/ginac/container.pl @@ -168,7 +168,6 @@ $constructors_implementation=generate( <<'END_OF_CONSTRUCTORS_IMPLEMENTATION','const ex & param${N}',', ',' seq.push_back(param${N});',"\n"); ${CONTAINER}::${CONTAINER}(${SEQ1}) : basic(TINFO_${CONTAINER}) { - debugmsg(\"${CONTAINER} ctor from ${N}*ex\",LOGLEVEL_CONSTRUCT); RESERVE(seq,${N}); ${SEQ2} } @@ -192,7 +191,7 @@ $interface=<(s)); } else { @@ -375,7 +369,6 @@ ${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) : basic(TINFO_$ ${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER}) { - debugmsg("${CONTAINER} ctor from ${STLT} *",LOGLEVEL_CONSTRUCT); GINAC_ASSERT(vp!=0); seq.swap(*vp); delete vp; @@ -390,7 +383,6 @@ ${constructors_implementation} /** Construct object from archive_node. */ ${CONTAINER}::${CONTAINER}(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("${CONTAINER} ctor from archive_node", LOGLEVEL_CONSTRUCT); for (unsigned int i=0; true; i++) { ex e; if (n.find_ex("seq", e, sym_lst, i)) @@ -425,8 +417,6 @@ void ${CONTAINER}::archive(archive_node &n) const void ${CONTAINER}::print(const print_context & c, unsigned level) const { - debugmsg("${CONTAINER} print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() @@ -440,7 +430,11 @@ void ${CONTAINER}::print(const print_context & c, unsigned level) const ++i; } c.s << std::string(level + delta_indent,' ') << "=====" << std::endl; - + } else if (is_a(c)) { + printseq(c, '[', ',', ']', precedence(), precedence()+1); + } else if (is_a(c)) { + c.s << class_name (); + printseq(c, '(', ',', ')', precedence(), precedence()+1); } else { // always print brackets around seq, ignore upper_precedence printseq(c, '${open_bracket}', ',', '${close_bracket}', precedence(), precedence()+1);