]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.cpp
sums of indexed matrices are now possible
[ginac.git] / ginac / structure.cpp
index 39c09bf19e56bddbaf505f3ec5591cb338c150a1..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. */
@@ -94,14 +92,14 @@ 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
@@ -162,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