]> www.ginac.de Git - ginac.git/blobdiff - ginac/color.cpp
mention the "dummy()" function option
[ginac.git] / ginac / color.cpp
index fc66b544e5ee7ae775c8a28884a2e0e29b9b022a..9a364c4395427198a842d765c0c057e34a6200b0 100644 (file)
 #include "mul.h"
 #include "power.h" // for sqrt()
 #include "symbol.h"
-#include "print.h"
 #include "archive.h"
 #include "utils.h"
 
 namespace GiNaC {
 
 GINAC_IMPLEMENT_REGISTERED_CLASS(color, indexed)
-GINAC_IMPLEMENT_REGISTERED_CLASS(su3one, tensor)
-GINAC_IMPLEMENT_REGISTERED_CLASS(su3t, tensor)
-GINAC_IMPLEMENT_REGISTERED_CLASS(su3f, tensor)
-GINAC_IMPLEMENT_REGISTERED_CLASS(su3d, tensor)
+
+GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3one, tensor,
+  print_func<print_dflt>(&su3one::do_print).
+  print_func<print_latex>(&su3one::do_print_latex))
+
+GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3t, tensor,
+  print_func<print_dflt>(&su3t::do_print).
+  print_func<print_latex>(&su3t::do_print))
+
+GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3f, tensor,
+  print_func<print_dflt>(&su3f::do_print).
+  print_func<print_latex>(&su3f::do_print))
+
+GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3d, tensor,
+  print_func<print_dflt>(&su3d::do_print).
+  print_func<print_latex>(&su3d::do_print))
 
 //////////
 // default constructors
@@ -83,7 +94,7 @@ color::color(unsigned char rl, const exvector & v, bool discardable) : inherited
        tinfo_key = TINFO_color;
 }
 
-color::color(unsigned char rl, exvector * vp) : inherited(sy_none(), vp), representation_label(rl)
+color::color(unsigned char rl, std::auto_ptr<exvector> vp) : inherited(sy_none(), vp), representation_label(rl)
 {
        tinfo_key = TINFO_color;
 }
@@ -172,7 +183,7 @@ ex color::thiscontainer(const exvector & v) const
        return color(representation_label, v);
 }
 
-ex color::thiscontainer(exvector * vp) const
+ex color::thiscontainer(std::auto_ptr<exvector> vp) const
 {
        return color(representation_label, vp);
 }