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

 1 humberto 1.1.2.1 #ifndef Pegasus_CQLExpressionRep_h
 2                  #define Pegasus_CQLExpressionRep_h
 3                  
 4                  #include <Pegasus/Common/Config.h>
 5                  #include <Pegasus/CQL/CQLValue.h>
 6                  #include <Pegasus/CQL/Linkage.h>
 7                  #include <Pegasus/CQL/CQLTerm.h>
 8                  
 9                  PEGASUS_NAMESPACE_BEGIN
10                  
11                  class PEGASUS_CQL_LINKAGE CQLFactory;
12                  class PEGASUS_CQL_LINKAGE QueryContext;
13                  
14                  /**
15                    The CQLExpression class encapsulates a generic CQL expression to make it
16                  easier to break into components and process the expression.  
17                  
18                     A CQL expression is made up of terms and operators. 
19                     For example,  'A + B' is a CQLExpression, where 'A' and 'B' are terms, and
20                  '+' is an operator.
21                  
22 humberto 1.1.2.1    There must be exactly one more term than there are operators.
23                    */
24                  //##ModelId=40FC03230150
25                  class PEGASUS_CQL_LINKAGE CQLExpressionRep
26                  {
27                    public:
28                     CQLExpressionRep(){}
29                      /** constructor takes one CQLTerm object.
30                        */
31                      CQLExpressionRep(CQLTerm& theTerm);
32 humberto 1.1.2.3    CQLExpressionRep(const CQLExpressionRep* rep);
33 humberto 1.1.2.1     /**  the getValue method evaluates the expression and returns the value.
34                            Any property that need to be resolved into a value is taken from the
35                      CIMInstance.
36                        */
37                      ~CQLExpressionRep();
38                  
39                      CQLValue resolveValue(CIMInstance CI, QueryContext& QueryCtx);
40                  
41                      /** The appendOperation is used by Bison.
42                            It is invoked 0 or more times for the CQLExpression, and
43                            when invoked will always pass in an integer that is the Term operation
44                            type and a CQLTerm object.
45                        */
46                      void appendOperation(TermOpType theTermOpType, CQLTerm& theTerm);
47                  
48                     String toString();
49 humberto 1.1.2.2    Boolean isSimple();
50 humberto 1.1.2.1    Boolean isSimpleValue();
51                     Array<CQLTerm> getTerms();
52                     Array<TermOpType> getOperators();
53                     void applyScopes(Array<CQLScope> inScopes);
54                     Boolean operator==(const CQLExpressionRep& rep);
55                     Boolean operator!=(const CQLExpressionRep& rep);
56                     friend class CQLFactory;
57                  
58                    private:
59                     
60                  
61                      /**  The _TermOperators member variable is an 
62                             array of operators that are valid to operate on Terms in a CQL
63                      expression. 
64                             Valid operators include concatentation, plus and minus.
65                      
66                             The array is ordered according to the operation from left to right.
67                        */
68                      
69                      Array<TermOpType> _TermOperators;
70                  
71 humberto 1.1.2.1     /**  The _CQLTerms member variable is an 
72                             array of operands that are valid in a CQL expression. 
73                      
74                             The array is ordered according to the operation from left to right.
75                        */
76                      Array<CQLTerm> _CQLTerms;
77                  
78 humberto 1.1.2.4     Boolean _isSimple;
79 humberto 1.1.2.1 };
80                  
81                  PEGASUS_NAMESPACE_END
82                  
83                  
84                  #endif /* CQLEXPRESSION_H_HEADER_INCLUDED_BEE5929F */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2