Generated on Mon Sep 17 2012 22:20:42 for Gecode by doxygen 1.8.1.1
var-imp.hpp
Go to the documentation of this file.
1 /*
2  * CAUTION:
3  * This file has been automatically generated. Do not edit,
4  * edit the following files instead:
5  * - ./gecode/int/var-imp/int.vis
6  * - ./gecode/int/var-imp/bool.vis
7  * - ./gecode/set/var-imp/set.vis
8  *
9  * This file contains generated code fragments which are
10  * copyrighted as follows:
11  *
12  * Main author:
13  * Christian Schulte <schulte@gecode.org>
14  *
15  * Copyright:
16  * Christian Schulte, 2007
17  *
18  * The generated code fragments are part of Gecode, the generic
19  * constraint development environment:
20  * http://www.gecode.org
21  *
22  * Permission is hereby granted, free of charge, to any person obtaining
23  * a copy of this software and associated documentation files (the
24  * "Software"), to deal in the Software without restriction, including
25  * without limitation the rights to use, copy, modify, merge, publish,
26  * distribute, sublicense, and/or sell copies of the Software, and to
27  * permit persons to whom the Software is furnished to do so, subject to
28  * the following conditions:
29  *
30  * The above copyright notice and this permission notice shall be
31  * included in all copies or substantial portions of the Software.
32  *
33  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
37  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
38  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
39  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40  *
41  */
42 
43 #ifdef GECODE_HAS_INT_VARS
44 namespace Gecode { namespace Int {
46  class IntVarImpBase : public Gecode::VarImp<Gecode::Int::IntVarImpConf> {
47  protected:
49  IntVarImpBase(Gecode::Space& home, bool share, IntVarImpBase& x);
50  public:
52  IntVarImpBase(void);
56 
57 
71  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
75  };
76 }}
77 #endif
78 #ifdef GECODE_HAS_INT_VARS
79 namespace Gecode { namespace Int {
81  class BoolVarImpBase : public Gecode::VarImp<Gecode::Int::BoolVarImpConf> {
82  protected:
84  BoolVarImpBase(Gecode::Space& home, bool share, BoolVarImpBase& x);
85  public:
87  BoolVarImpBase(void);
91 
92 
106  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
110  };
111 }}
112 #endif
113 #ifdef GECODE_HAS_SET_VARS
114 namespace Gecode { namespace Set {
116  class SetVarImpBase : public Gecode::VarImp<Gecode::Set::SetVarImpConf> {
117  protected:
119  SetVarImpBase(Gecode::Space& home, bool share, SetVarImpBase& x);
120  public:
122  SetVarImpBase(void);
126 
127 
141  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
145  };
146 }}
147 #endif
148 #ifdef GECODE_HAS_INT_VARS
149 namespace Gecode { namespace Int {
150 
153 
156  : Gecode::VarImp<Gecode::Int::IntVarImpConf>(home) {}
157 
160  : Gecode::VarImp<Gecode::Int::IntVarImpConf>(home,share,x) {}
161 
162  forceinline void
165  }
166  forceinline void
169  }
170 
173  switch (me) {
174  case ME_INT_VAL:
175  // Conditions: VAL, BND, DOM
178  return ME_INT_FAILED;
179  cancel(home);
180  break;
181  case ME_INT_BND:
182  // Conditions: BND, DOM
185  return ME_INT_FAILED;
186  break;
187  case ME_INT_DOM:
188  // Conditions: DOM
191  return ME_INT_FAILED;
192  break;
193  default: GECODE_NEVER;
194  }
195  return me;
196  }
197 
198 }}
199 #endif
200 #ifdef GECODE_HAS_INT_VARS
201 namespace Gecode { namespace Int {
202 
205 
208  : Gecode::VarImp<Gecode::Int::BoolVarImpConf>(home) {}
209 
212  : Gecode::VarImp<Gecode::Int::BoolVarImpConf>(home,share,x) {}
213 
214  forceinline void
217  }
218  forceinline void
221  }
222 
227  return ME_BOOL_FAILED;
228  cancel(home);
229  return ME_BOOL_VAL;
230  }
231 
232 }}
233 #endif
234 #ifdef GECODE_HAS_SET_VARS
235 namespace Gecode { namespace Set {
236 
239 
242  : Gecode::VarImp<Gecode::Set::SetVarImpConf>(home) {}
243 
246  : Gecode::VarImp<Gecode::Set::SetVarImpConf>(home,share,x) {}
247 
248  forceinline void
251  }
252  forceinline void
255  }
256 
259  switch (me) {
260  case ME_SET_VAL:
261  // Conditions: VAL, CARD, CLUB, CGLB, ANY
264  return ME_SET_FAILED;
265  cancel(home);
266  break;
267  case ME_SET_CARD:
268  // Conditions: CARD, CLUB, CGLB, ANY
271  return ME_SET_FAILED;
272  break;
273  case ME_SET_LUB:
274  // Conditions: CLUB, ANY
278  return ME_SET_FAILED;
279  break;
280  case ME_SET_GLB:
281  // Conditions: CGLB, ANY
284  return ME_SET_FAILED;
285  break;
286  case ME_SET_BB:
287  // Conditions: CLUB, CGLB, ANY
290  return ME_SET_FAILED;
291  break;
292  case ME_SET_CLUB:
293  // Conditions: CARD, CLUB, CGLB, ANY
296  return ME_SET_FAILED;
297  break;
298  case ME_SET_CGLB:
299  // Conditions: CARD, CLUB, CGLB, ANY
302  return ME_SET_FAILED;
303  break;
304  case ME_SET_CBB:
305  // Conditions: CARD, CLUB, CGLB, ANY
308  return ME_SET_FAILED;
309  break;
310  default: GECODE_NEVER;
311  }
312  return me;
313  }
314 
315 }}
316 #endif
317 namespace Gecode {
318 
319  forceinline void
320  Space::update(ActorLink** sub) {
321 #ifdef GECODE_HAS_INT_VARS
323 #endif
324 #ifdef GECODE_HAS_INT_VARS
326 #endif
327 #ifdef GECODE_HAS_SET_VARS
329 #endif
330  }
331 }
332 // STATISTICS: kernel-var