1 humberto 1.1.2.1 #ifndef Pegasus_CQLSimplePredicate_h
2 #define Pegasus_CQLSimplePredicate_h
3
4 #include <Pegasus/Common/Config.h>
5 #include <Pegasus/CQL/Linkage.h>
6 #include <Pegasus/Common/CIMInstance.h>
7
8 PEGASUS_NAMESPACE_BEGIN
9
|
10 humberto 1.1.2.3 class PEGASUS_CQL_LINKAGE CQLExpression;
11 class PEGASUS_CQL_LINKAGE CQLFactory;
|
12 humberto 1.1.2.4 class PEGASUS_CQL_LINKAGE CQLSimplePredicateRep;
13 class PEGASUS_CQL_LINKAGE QueryContext;
14
|
15 humberto 1.1.2.1 enum ExpressionOpType { LT, GT, EQ, LE, GE, NE, IS_NULL, IS_NOT_NULL, ISA, LIKE };
16
17 /**
18 */
19 class CQLSimplePredicate
20 {
21 public:
|
22 humberto 1.1.2.4 CQLSimplePredicate():_rep(0){}
|
23 humberto 1.1.2.1
24 CQLSimplePredicate(const CQLExpression& inExpression);
25
26 CQLSimplePredicate(const CQLExpression& inExpression, ExpressionOpType inOperator);
27
28 CQLSimplePredicate(const CQLExpression& leftSideExpression, const CQLExpression& rightSideExpression, ExpressionOpType inOperator);
29
|
30 humberto 1.1.2.4 CQLSimplePredicate(const CQLSimplePredicate& inSimplePredicate);
31
32 ~CQLSimplePredicate();
|
33 humberto 1.1.2.1
34 /**
35 CQLExpressions:
36 For an expression, CQLExpression::getValue is called and will return a
37 CQLValue.
38 The appropriate operator is then invoked on CQLValue and that operator
39 function will
40 enforce the type restrictions as documented in the DMTF CQL
41 Specification.
42 That operator then determines whether the predicate is TRUE / FALSE.
43
44
45 CQLPredicates:
46 The CQLPredicate is non-terminal if it contains only CQLPredicate
47 objects.
48 A non-terminal CQLPredicate is evaluated by in turn evaluating the
49 contained CQLPredicates and
50 boolean operator.
51 Valid operators are:
52 AND, OR
53
54 humberto 1.1.2.1 For the evaluate method on each CQLPredicate. the CQLPredicate is
55 evaluated to TRUE/FALSE and
56 the result of the evaluation is then applied to the appropriate boolean
57 operator.
58
59 The result of the evaluation is and then inverted if the _invert member
60 variable is set to TRUE
61 and then returned to the caller.
62
63 */
64 Boolean evaluate(CIMInstance CI, QueryContext& QueryCtx);
65
66 CQLExpression getLeftExpression();
67
68 CQLExpression getRightExpression();
69
70 enum ExpressionOpType getOperation();
71
72 String toString();
73
|
74 humberto 1.1.2.3 friend class CQLFactory;
|
75 humberto 1.1.2.1 private:
|
76 humberto 1.1.2.4 CQLSimplePredicateRep *_rep;
|
77 humberto 1.1.2.1
78 };
79 PEGASUS_NAMESPACE_END
80
81 #endif
|