Generated on Tue Oct 22 2013 00:49:01 for Gecode by doxygen 1.8.4
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  * - ./gecode/float/var-imp/float.vis
9  *
10  * This file contains generated code fragments which are
11  * copyrighted as follows:
12  *
13  * Main author:
14  * Christian Schulte <schulte@gecode.org>
15  *
16  * Copyright:
17  * Christian Schulte, 2007
18  *
19  * The generated code fragments are part of Gecode, the generic
20  * constraint development environment:
21  * http://www.gecode.org
22  *
23  * Permission is hereby granted, free of charge, to any person obtaining
24  * a copy of this software and associated documentation files (the
25  * "Software"), to deal in the Software without restriction, including
26  * without limitation the rights to use, copy, modify, merge, publish,
27  * distribute, sublicense, and/or sell copies of the Software, and to
28  * permit persons to whom the Software is furnished to do so, subject to
29  * the following conditions:
30  *
31  * The above copyright notice and this permission notice shall be
32  * included in all copies or substantial portions of the Software.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41  *
42  */
43 
44 #ifdef GECODE_HAS_INT_VARS
45 namespace Gecode { namespace Int {
47  class IntVarImpBase : public Gecode::VarImp<Gecode::Int::IntVarImpConf> {
48  protected:
50  IntVarImpBase(Gecode::Space& home, bool share, IntVarImpBase& x);
51  public:
53  IntVarImpBase(void);
57 
58 
72  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
76  };
77 }}
78 #endif
79 #ifdef GECODE_HAS_INT_VARS
80 namespace Gecode { namespace Int {
82  class BoolVarImpBase : public Gecode::VarImp<Gecode::Int::BoolVarImpConf> {
83  protected:
85  BoolVarImpBase(Gecode::Space& home, bool share, BoolVarImpBase& x);
86  public:
88  BoolVarImpBase(void);
92 
93 
107  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
111  };
112 }}
113 #endif
114 #ifdef GECODE_HAS_SET_VARS
115 namespace Gecode { namespace Set {
117  class SetVarImpBase : public Gecode::VarImp<Gecode::Set::SetVarImpConf> {
118  protected:
120  SetVarImpBase(Gecode::Space& home, bool share, SetVarImpBase& x);
121  public:
123  SetVarImpBase(void);
127 
128 
142  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
146  };
147 }}
148 #endif
149 #ifdef GECODE_HAS_FLOAT_VARS
150 namespace Gecode { namespace Float {
152  class FloatVarImpBase : public Gecode::VarImp<Gecode::Float::FloatVarImpConf> {
153  protected:
155  FloatVarImpBase(Gecode::Space& home, bool share, FloatVarImpBase& x);
156  public:
158  FloatVarImpBase(void);
162 
163 
177  void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned);
181  };
182 }}
183 #endif
184 #ifdef GECODE_HAS_INT_VARS
185 namespace Gecode { namespace Int {
186 
189 
192  : Gecode::VarImp<Gecode::Int::IntVarImpConf>(home) {}
193 
196  : Gecode::VarImp<Gecode::Int::IntVarImpConf>(home,share,x) {}
197 
198  forceinline void
201  }
202  forceinline void
205  }
206 
209  switch (me) {
210  case ME_INT_VAL:
211  // Conditions: VAL, BND, DOM
214  return ME_INT_FAILED;
215  cancel(home);
216  break;
217  case ME_INT_BND:
218  // Conditions: BND, DOM
221  return ME_INT_FAILED;
222  break;
223  case ME_INT_DOM:
224  // Conditions: DOM
227  return ME_INT_FAILED;
228  break;
229  default: GECODE_NEVER;
230  }
231  return me;
232  }
233 
234 }}
235 #endif
236 #ifdef GECODE_HAS_INT_VARS
237 namespace Gecode { namespace Int {
238 
241 
244  : Gecode::VarImp<Gecode::Int::BoolVarImpConf>(home) {}
245 
248  : Gecode::VarImp<Gecode::Int::BoolVarImpConf>(home,share,x) {}
249 
250  forceinline void
253  }
254  forceinline void
257  }
258 
263  return ME_BOOL_FAILED;
264  cancel(home);
265  return ME_BOOL_VAL;
266  }
267 
268 }}
269 #endif
270 #ifdef GECODE_HAS_SET_VARS
271 namespace Gecode { namespace Set {
272 
275 
278  : Gecode::VarImp<Gecode::Set::SetVarImpConf>(home) {}
279 
282  : Gecode::VarImp<Gecode::Set::SetVarImpConf>(home,share,x) {}
283 
284  forceinline void
287  }
288  forceinline void
291  }
292 
295  switch (me) {
296  case ME_SET_VAL:
297  // Conditions: VAL, CARD, CLUB, CGLB, ANY
300  return ME_SET_FAILED;
301  cancel(home);
302  break;
303  case ME_SET_CARD:
304  // Conditions: CARD, CLUB, CGLB, ANY
307  return ME_SET_FAILED;
308  break;
309  case ME_SET_LUB:
310  // Conditions: CLUB, ANY
314  return ME_SET_FAILED;
315  break;
316  case ME_SET_GLB:
317  // Conditions: CGLB, ANY
320  return ME_SET_FAILED;
321  break;
322  case ME_SET_BB:
323  // Conditions: CLUB, CGLB, ANY
326  return ME_SET_FAILED;
327  break;
328  case ME_SET_CLUB:
329  // Conditions: CARD, CLUB, CGLB, ANY
332  return ME_SET_FAILED;
333  break;
334  case ME_SET_CGLB:
335  // Conditions: CARD, CLUB, CGLB, ANY
338  return ME_SET_FAILED;
339  break;
340  case ME_SET_CBB:
341  // Conditions: CARD, CLUB, CGLB, ANY
344  return ME_SET_FAILED;
345  break;
346  default: GECODE_NEVER;
347  }
348  return me;
349  }
350 
351 }}
352 #endif
353 #ifdef GECODE_HAS_FLOAT_VARS
354 namespace Gecode { namespace Float {
355 
358 
361  : Gecode::VarImp<Gecode::Float::FloatVarImpConf>(home) {}
362 
365  : Gecode::VarImp<Gecode::Float::FloatVarImpConf>(home,share,x) {}
366 
367  forceinline void
370  }
371  forceinline void
374  }
375 
378  switch (me) {
379  case ME_FLOAT_VAL:
380  // Conditions: VAL, BND
383  return ME_FLOAT_FAILED;
384  cancel(home);
385  break;
386  case ME_FLOAT_BND:
387  // Conditions: BND
390  return ME_FLOAT_FAILED;
391  break;
392  default: GECODE_NEVER;
393  }
394  return me;
395  }
396 
397 }}
398 #endif
399 namespace Gecode {
400 
401  forceinline void
402  Space::update(ActorLink** sub) {
403 #ifdef GECODE_HAS_INT_VARS
405 #endif
406 #ifdef GECODE_HAS_INT_VARS
408 #endif
409 #ifdef GECODE_HAS_SET_VARS
411 #endif
412 #ifdef GECODE_HAS_FLOAT_VARS
414 #endif
415  }
416 }
417 // STATISTICS: kernel-var