(file) Return to CQLSimplePredicateRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2