]> www.ginac.de Git - ginac.git/blob - ginac/coloridx.h
removed debugging output in lsolve()
[ginac.git] / ginac / coloridx.h
1 /** @file coloridx.h
2  *
3  *  Interface to GiNaC's color indices. */
4
5 /*
6  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #ifndef __GINAC_COLORIDX_H__
24 #define __GINAC_COLORIDX_H__
25
26 #include <string>
27 #include <vector>
28 #include <ginac/idx.h>
29 #include <ginac/ex.h>
30
31 namespace GiNaC {
32
33 class coloridx : public idx
34 {
35     friend class color;
36
37 // member functions
38
39     // default constructor, destructor, copy constructor assignment operator and helpers
40 public:
41     coloridx();
42     ~coloridx();
43     coloridx (coloridx const & other);
44     coloridx const & operator=(coloridx const & other);
45 protected:
46     void copy(coloridx const & other);
47     void destroy(bool call_parent);
48
49     // other constructors
50 public:
51     explicit coloridx(bool cov);
52     explicit coloridx(string const & n, bool cov=false);
53     explicit coloridx(char const * n, bool cov=false);
54     explicit coloridx(unsigned const v, bool cov=false); 
55
56     // functions overriding virtual functions from bases classes
57 public:
58     basic * duplicate() const;
59     void printraw(ostream & os) const;
60     void printtree(ostream & os, unsigned indent) const;
61     void print(ostream & os, unsigned upper_precedence=0) const;
62     bool info(unsigned inf) const;
63
64     // new virtual functions which can be overridden by derived classes
65     // none
66
67     // non-virtual functions in this class
68     // none
69
70     // member variables
71     // none
72 };
73
74 // global constants
75
76 extern const coloridx some_coloridx;
77 extern type_info const & typeid_coloridx;
78
79 // utility functions
80 inline const coloridx &ex_to_coloridx(const ex &e)
81 {
82         return static_cast<const coloridx &>(*e.bp);
83 }
84
85 } // namespace GiNaC
86
87 #endif // ndef __GINAC_COLORIDX_H__