<<'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}
}
* \$close_bracket=${close_bracket}
* \$maxargs=${maxargs}
*
- * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* \$close_bracket=${close_bracket}
* \$maxargs=${maxargs}
*
- * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "ex.h"
#include "print.h"
#include "archive.h"
-#include "debugmsg.h"
namespace GiNaC {
${RESERVE_IMPLEMENTATION}
//////////
-// default ctor, dtor, copy ctor assignment operator and helpers
+// default ctor, dtor, copy ctor, assignment operator and helpers
//////////
// public
-${CONTAINER}::${CONTAINER}() : basic(TINFO_${CONTAINER})
-{
- debugmsg("${CONTAINER} default ctor",LOGLEVEL_CONSTRUCT);
-}
+${CONTAINER}::${CONTAINER}() : basic(TINFO_${CONTAINER}) {}
// protected
${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) : basic(TINFO_${CONTAINER})
{
- debugmsg("${CONTAINER} ctor from ${STLT}", LOGLEVEL_CONSTRUCT);
if (discardable) {
seq.swap(const_cast<${STLT} &>(s));
} else {
${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER})
{
- debugmsg("${CONTAINER} ctor from ${STLT} *",LOGLEVEL_CONSTRUCT);
GINAC_ASSERT(vp!=0);
seq.swap(*vp);
delete vp;
/** 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))
void ${CONTAINER}::print(const print_context & c, unsigned level) const
{
- debugmsg("${CONTAINER} print", LOGLEVEL_PRINT);
-
if (is_a<print_tree>(c)) {
c.s << std::string(level, ' ') << class_name()
++i;
}
c.s << std::string(level + delta_indent,' ') << "=====" << std::endl;
-
+ } else if (is_a<print_python>(c)) {
+ printseq(c, '[', ',', ']', precedence(), precedence()+1);
+ } else if (is_a<print_python_repr>(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);