]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.cpp
- powers with negative exponents are printed as fractions in the LaTeX output
[ginac.git] / ginac / structure.cpp
index 54dc1dfc62ae7f592eb50d362a6716a441e3ed38..c8c0e2b0dd7812859720b93da8b1d2a8748f9d03 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of 'abstract' class structure. */
 
 /*
- *  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
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <iostream>
 #include <string>
 
 #include "structure.h"
 #include "archive.h"
-#include "debugmsg.h"
 #include "utils.h"
 #include "print.h"
 
@@ -33,7 +33,7 @@ namespace GiNaC {
 GINAC_IMPLEMENT_REGISTERED_CLASS(structure, basic)
 
 //////////
-// default ctor, dtor, copy ctor assignment operator and helpers
+// default ctor, dtor, copy ctor, assignment operator and helpers
 //////////
 
 DEFAULT_CTORS(structure)
@@ -45,14 +45,12 @@ DEFAULT_CTORS(structure)
 DEFAULT_ARCHIVING(structure)
 
 //////////
-// functions overriding virtual functions from bases classes
+// functions overriding virtual functions from base classes
 //////////
 
 void structure::print(const print_context & c, unsigned level) const
 {
-       debugmsg("structure print",LOGLEVEL_PRINT);
-
-       if (is_of_type(c, print_tree)) {
+       if (is_a<print_tree>(c)) {
 
                c.s << std::string(level, ' ') << class_name()
                    << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec
@@ -68,7 +66,7 @@ DEFAULT_COMPARE(structure)
 
 bool structure::is_equal_same_type(const basic & other) const
 {
-       GINAC_ASSERT(is_of_type(other, structure));
+       GINAC_ASSERT(is_a<structure>(other));
        return true; // all structures are the same
 }