]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.cpp
* add missing std::.
[ginac.git] / ginac / structure.cpp
index 4aa4f10c6aa13cb1a9a5114df7a6c6380721ede4..e9c3b0213f45cb9055cbd2f3404604b4325328b7 100644 (file)
 #include "archive.h"
 #include "debugmsg.h"
 
-#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
 
 GINAC_IMPLEMENT_REGISTERED_CLASS(structure, basic)
 
 //////////
-// default constructor, destructor, copy constructor assignment operator and helpers
+// default ctor, dtor, copy ctor assignment operator and helpers
 //////////
 
 // public
 
 structure::structure()
 {
-       debugmsg("structure default constructor",LOGLEVEL_CONSTRUCT);
+       debugmsg("structure default ctor",LOGLEVEL_CONSTRUCT);
        tinfo_key = TINFO_structure;
 }
 
@@ -57,7 +55,7 @@ void structure::destroy(bool call_parent)
 }
 
 //////////
-// other constructors
+// other ctors
 //////////
 
 // none
@@ -69,7 +67,7 @@ void structure::destroy(bool call_parent)
 /** Construct object from archive_node. */
 structure::structure(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
 {
-       debugmsg("structure constructor from archive_node", LOGLEVEL_CONSTRUCT);
+       debugmsg("structure ctor from archive_node", LOGLEVEL_CONSTRUCT);
 }
 
 /** Unarchive the object. */
@@ -90,24 +88,18 @@ void structure::archive(archive_node &n) const
 
 // public
 
-basic * structure::duplicate() const
-{
-       debugmsg("structure duplicate",LOGLEVEL_DUPLICATE);
-       return new structure(*this);
-}
-
 void structure::printraw(std::ostream & os) const
 {
        debugmsg("structure printraw",LOGLEVEL_PRINT);
 
-       os << "structure(hash=" << hashvalue << ",flags=" << flags << ")";
+       os << class_name() << "(hash=" << hashvalue << ",flags=" << flags << ")";
 }
 
 void structure::print(std::ostream & os, unsigned upper_precedence) const
 {
        debugmsg("structure print",LOGLEVEL_PRINT);
 
-       os << "structure()";
+       os << class_name() << "()";
 }
 
 void structure::printtree(std::ostream & os, unsigned indent) const
@@ -168,6 +160,4 @@ unsigned structure::register_new(const char * nm)
        return registered_structures().size()-1;
 }
 
-#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC