]> www.ginac.de Git - ginac.git/blobdiff - ginac/clifford.h
* Oops, forgot to cvs add the two new files in last commit.
[ginac.git] / ginac / clifford.h
index 8dbc3767ddb94330fee5530ab7a90f7a0fb52489..f551abb71febcd2936d444bc74f51612edf38f46 100644 (file)
@@ -45,17 +45,14 @@ public:
 
        // internal constructors
        clifford(unsigned char rl, const exvector & v, bool discardable = false);
-       clifford(unsigned char rl, exvector * vp); // vp will be deleted
+       clifford(unsigned char rl, std::auto_ptr<exvector> vp);
 
        // functions overriding virtual functions from base classes
-public:
-       void print(const print_context & c, unsigned level = 0) const;
-
 protected:
        ex eval_ncmul(const exvector & v) const;
        bool match_same_type(const basic & other) const;
        ex thiscontainer(const exvector & v) const;
-       ex thiscontainer(exvector * vp) const;
+       ex thiscontainer(std::auto_ptr<exvector> vp) const;
        unsigned return_type() const { return return_types::noncommutative; }
        unsigned return_type_tinfo() const { return TINFO_clifford + representation_label; }
 
@@ -63,6 +60,10 @@ protected:
 public:
        unsigned char get_representation_label() const {return representation_label;}
 
+protected:
+       void do_print_dflt(const print_dflt & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
+
        // member variables
 private:
        unsigned char representation_label; /**< Representation label to distinguish independent spin lines */
@@ -74,9 +75,10 @@ class diracone : public tensor
 {
        GINAC_DECLARE_REGISTERED_CLASS(diracone, tensor)
 
-       // functions overriding virtual functions from base classes
-public:
-       void print(const print_context & c, unsigned level = 0) const;
+       // non-virtual functions in this class
+protected:
+       void do_print(const print_context & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
 };
 
 
@@ -87,8 +89,12 @@ class diracgamma : public tensor
 
        // functions overriding virtual functions from base classes
 public:
-       void print(const print_context & c, unsigned level = 0) const;
        bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
+
+       // non-virtual functions in this class
+protected:
+       void do_print(const print_context & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
 };
 
 
@@ -98,9 +104,10 @@ class diracgamma5 : public tensor
 {
        GINAC_DECLARE_REGISTERED_CLASS(diracgamma5, tensor)
 
-       // functions overriding virtual functions from base classes
-public:
-       void print(const print_context & c, unsigned level = 0) const;
+       // non-virtual functions in this class
+protected:
+       void do_print(const print_context & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
 };
 
 
@@ -110,9 +117,10 @@ class diracgammaL : public tensor
 {
        GINAC_DECLARE_REGISTERED_CLASS(diracgammaL, tensor)
 
-       // functions overriding virtual functions from base classes
-public:
-       void print(const print_context & c, unsigned level = 0) const;
+       // non-virtual functions in this class
+protected:
+       void do_print(const print_context & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
 };
 
 
@@ -122,9 +130,10 @@ class diracgammaR : public tensor
 {
        GINAC_DECLARE_REGISTERED_CLASS(diracgammaR, tensor)
 
-       // functions overriding virtual functions from base classes
-public:
-       void print(const print_context & c, unsigned level = 0) const;
+       // non-virtual functions in this class
+protected:
+       void do_print(const print_context & c, unsigned level) const;
+       void do_print_latex(const print_latex & c, unsigned level) const;
 };