this repo has no description
1/**** , [ StrategyNode.hh ],
2Copyright (c) 2008 Universite d'Orleans - Jeremie Vautard
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20THE SOFTWARE.
21 *************************************************************************/
22#ifndef __QECODE_STRATEGY_NODE__
23#define __QECODE_STRATEGY_NODE__
24 #include "qecode.hh"
25#include <vector>
26using namespace std;
27class QECODE_VTABLE_EXPORT StrategyNode {
28public:
29 int type; // 0 = dummy, 1 = empty, 2 = normal, 3 = Todo.
30 bool quantifier;
31 int Vmin;
32 int Vmax;
33 int scope;
34 vector<int> valeurs;
35
36 QECODE_EXPORT StrategyNode();
37 QECODE_EXPORT StrategyNode(int type,bool qt,int Vmin, int Vmax, int scope);
38 QECODE_EXPORT ~StrategyNode();
39 QECODE_EXPORT static StrategyNode STrue() { return StrategyNode(1,true,-1,-1,-1);}
40 QECODE_EXPORT static StrategyNode SFalse() { return StrategyNode(1,false,-1,-1,-1);}
41 QECODE_EXPORT static StrategyNode Dummy() { return StrategyNode(0,true,-1,-1,-1);}
42 QECODE_EXPORT static StrategyNode Todo() { return StrategyNode(3,false,-1,-1,-1);}
43 QECODE_EXPORT forceinline bool isFalse() { return ( (type==1) && (quantifier == false) );}
44 QECODE_EXPORT forceinline bool isTrue() { return ( (type==1) && (quantifier == true) );}
45 QECODE_EXPORT forceinline bool isDummy() { return (type==0);}
46 QECODE_EXPORT forceinline bool isTodo() { return (type==3);}
47};
48#endif
49