~ubuntu-branches/ubuntu/wily/chemeq/wily

« back to all changes in this revision

Viewing changes to src/chemeq.h

  • Committer: Bazaar Package Importer
  • Author(s): Georges Khaznadar
  • Date: 2006-04-02 16:45:22 UTC
  • Revision ID: james.westby@ubuntu.com-20060402164522-gjv7hcv1hdrzhnc0
Tags: 1.9
recompiled with a new version of flex (see 
http://www.debian.org/security/2006/dsa-1020)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
fraction operator * (int m, fraction f);
42
42
fraction operator * (fraction f, fraction m);
43
43
fraction operator + (fraction f, fraction g);
 
44
fraction operator - (fraction f, fraction g);
44
45
 
45
46
bool operator > (fraction f, int i);
 
47
bool operator > (fraction f1, fraction f2);
46
48
bool operator != (fraction f, int i);
47
49
 
48
50
class AtomeListe{
75
77
  void compte (Compteur &c, fraction mult=fraction(1,1))const;
76
78
  double weight(fraction mult=fraction(1,1))const;
77
79
  static AtomeListe * triage(AtomeListe * al);
78
 
  void printnorm(std::ostream & o);
 
80
  void printnorm(std::ostream & o) const;
79
81
  void debug(int decal = 0)const{
80
82
    for (int i=0; i< decal; i++) std::cout << " ";
81
83
    std::cout << "AtomeListe : ( & = " << this << " symb=\"" << symb << "\" Zed = " << Zed 
87
89
  };
88
90
};
89
91
 
 
92
bool operator == (const AtomeListe & a1, const AtomeListe & a2);
 
93
 
90
94
typedef enum { aqueous, gas, sol } moltype;
91
95
 
92
96
extern char* moltypeStr[]; /* les cha�nes aq, g,s */
93
97
 
 
98
class Membre;
 
99
 
94
100
class Molec{
95
101
  AtomeListe * al;
96
102
  int ch;
127
133
    al->debug(decal+2);
128
134
    std::cout << ")\n";
129
135
  };
 
136
  // two Molecs are equal if the AtomLists and the charges are equal.
 
137
  friend bool operator == (const Molec & m1, const Molec & m2);
 
138
  friend Membre operator & (Membre & m1, Membre & m2);
 
139
  friend Membre operator - (Membre & m1, Membre & m2);
130
140
};
131
141
 
 
142
bool operator == (const Molec & m1, const Molec & m2);
132
143
std::ostream & operator << (std::ostream & o, const AtomeListe & l);
133
144
std::ostream & operator << (std::ostream & o, const Molec & m);
134
145
 
155
166
  }
156
167
};
157
168
 
 
169
// intersection between two Membres
 
170
Membre operator & (Membre & m1, Membre & m2);
 
171
// members of first set which are not in the second
 
172
Membre operator - (Membre & m1, Membre & m2);
 
173
 
158
174
std::ostream & operator << (std::ostream & o, const Membre & m);
159
175
 
160
176
class Chemeq{