3 * Interface to GiNaC's color indices. */
13 class coloridx : public idx
19 // default constructor, destructor, copy constructor assignment operator and helpers
23 coloridx (coloridx const & other);
24 coloridx const & operator=(coloridx const & other);
26 void copy(coloridx const & other);
27 void destroy(bool call_parent);
31 explicit coloridx(bool cov);
32 explicit coloridx(string const & n, bool cov=false);
33 explicit coloridx(char const * n, bool cov=false);
34 explicit coloridx(unsigned const v, bool cov=false);
36 // functions overriding virtual functions from bases classes
38 basic * duplicate() const;
39 void printraw(ostream & os) const;
40 void printtree(ostream & os, unsigned indent) const;
41 void print(ostream & os, unsigned upper_precedence=0) const;
42 bool info(unsigned inf) const;
44 // new virtual functions which can be overridden by derived classes
47 // non-virtual functions in this class
56 extern const coloridx some_coloridx;
57 extern type_info const & typeid_coloridx;
61 #define ex_to_coloridx(X) (static_cast<coloridx const &>(*(X).bp))
63 #endif // ndef _COLORIDX_H_