X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fcolor.cpp;h=9a364c4395427198a842d765c0c057e34a6200b0;hp=fc66b544e5ee7ae775c8a28884a2e0e29b9b022a;hb=9c1cf297cde7fb7d7cd863684c1754c3d140f93f;hpb=68fdf425abf14d016d5f95ee7b9d06a19a3c5926 diff --git a/ginac/color.cpp b/ginac/color.cpp index fc66b544..9a364c43 100644 --- a/ginac/color.cpp +++ b/ginac/color.cpp @@ -32,17 +32,28 @@ #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(&su3one::do_print). + print_func(&su3one::do_print_latex)) + +GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3t, tensor, + print_func(&su3t::do_print). + print_func(&su3t::do_print)) + +GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3f, tensor, + print_func(&su3f::do_print). + print_func(&su3f::do_print)) + +GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3d, tensor, + print_func(&su3d::do_print). + print_func(&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 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 vp) const { return color(representation_label, vp); }