X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=sidebyside;f=ginac%2Fcontainer.pl;h=571330f982ebde9f0f34a5b80132ea4ff05f94d2;hb=d1f1d71f9cb477a1931ecf47d9fe78d020bb0dfa;hp=bbeb3b4a0f5de0a251b1a56a31791c6e719f5e8b;hpb=383d5eb3b0f0506810d9105a268f939125bfc347;p=ginac.git diff --git a/ginac/container.pl b/ginac/container.pl index bbeb3b4a..571330f9 100755 --- a/ginac/container.pl +++ b/ginac/container.pl @@ -132,7 +132,7 @@ $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} constructor from ${N}*ex\",LOGLEVEL_CONSTRUCT); + debugmsg(\"${CONTAINER} ctor from ${N}*ex\",LOGLEVEL_CONSTRUCT); RESERVE(seq,${N}); ${SEQ2} } @@ -183,9 +183,7 @@ $interface=< but malloc_alloc is @@ -200,22 +198,12 @@ class ${CONTAINER} : public basic { GINAC_DECLARE_REGISTERED_CLASS(${CONTAINER}, basic) -public: - ${CONTAINER}(); - ~${CONTAINER}(); - ${CONTAINER}(${CONTAINER} const & other); - ${CONTAINER} const & operator=(${CONTAINER} const & other); -protected: - void copy(${CONTAINER} const & other); - void destroy(bool call_parent); - public: ${CONTAINER}(${STLT} const & s, bool discardable=0); ${CONTAINER}(${STLT} * vp); // vp will be deleted ${constructors_interface} public: - basic * duplicate() const; void printraw(std::ostream & os) const; void print(std::ostream & os, unsigned upper_precedence=0) const; void printtree(std::ostream & os, unsigned indent) const; @@ -230,7 +218,6 @@ public: ex derivative(const symbol & s) const; ex subs(const lst & ls, const lst & lr) const; protected: - int compare_same_type(const basic & other) const; bool is_equal_same_type(const basic & other) const; unsigned return_type(void) const; @@ -274,9 +261,7 @@ inline ${CONTAINER} &ex_to_nonconst_${CONTAINER}(const ex &e) return static_cast<${CONTAINER} &>(*e.bp); } -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_${CONTAINER_UC}_H__ @@ -324,45 +309,21 @@ $implementation=<(s)); } else { @@ -397,7 +358,7 @@ ${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) : basic(TINFO_$ ${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER}) { - debugmsg("${CONTAINER} constructor from ${STLT} *",LOGLEVEL_CONSTRUCT); + debugmsg("${CONTAINER} ctor from ${STLT} *",LOGLEVEL_CONSTRUCT); GINAC_ASSERT(vp!=0); seq.swap(*vp); delete vp; @@ -412,7 +373,7 @@ ${constructors_implementation} /** Construct object from archive_node. */ ${CONTAINER}::${CONTAINER}(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("${CONTAINER} constructor from archive_node", LOGLEVEL_CONSTRUCT); + 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)) @@ -445,17 +406,11 @@ void ${CONTAINER}::archive(archive_node &n) const // public -basic * ${CONTAINER}::duplicate() const -{ - debugmsg("${CONTAINER} duplicate",LOGLEVEL_DUPLICATE); - return new ${CONTAINER}(*this); -} - void ${CONTAINER}::printraw(std::ostream & os) const { debugmsg("${CONTAINER} printraw",LOGLEVEL_PRINT); - os << "${CONTAINER}("; + os << class_name() << "("; for (${STLT}::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) { (*cit).bp->printraw(os); os << ","; @@ -792,7 +747,7 @@ ${STLT} * ${CONTAINER}::subschildren(const lst & ls, const lst & lr) const // protected -unsigned ${CONTAINER}::precedence=10; +unsigned ${CONTAINER}::precedence = 10; ////////// // global constants @@ -801,9 +756,7 @@ unsigned ${CONTAINER}::precedence=10; const ${CONTAINER} some_${CONTAINER}; const std::type_info & typeid_${CONTAINER} = typeid(some_${CONTAINER}); -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC END_OF_IMPLEMENTATION