]> www.ginac.de Git - ginac.git/blobdiff - ginac/utils.h
- replaced the various print*() member functions by a single print() that
[ginac.git] / ginac / utils.h
index 6e1d3ae8a55caa31987db800a2da7180fe712bba..c2a5f232336f3576ee9d72f75bd5b6e2f2c18f2e 100644 (file)
@@ -292,10 +292,13 @@ int classname::compare_same_type(const basic & other) const \
 }
 
 #define DEFAULT_PRINT(classname, text) \
-void classname::print(std::ostream & os, unsigned upper_precedence) const \
+void classname::print(const print_context & c, unsigned level) const \
 { \
        debugmsg(#classname " print", LOGLEVEL_PRINT); \
-       os << text; \
+       if (is_of_type(c, print_tree)) \
+               inherited::print(c, level); \
+       else \
+               c.s << text; \
 }
 
 } // namespace GiNaC