(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                     CQLExpressionRep(const CQLExpressionRep& rep);
33                      /**  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 humberto 1.1.2.1           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                     Boolean isSimpleValue();
50                     Array<CQLTerm> getTerms();
51                     Array<TermOpType> getOperators();
52                     void applyScopes(Array<CQLScope> inScopes);
53                     Boolean operator==(const CQLExpressionRep& rep);
54                     Boolean operator!=(const CQLExpressionRep& rep);
55                     friend class CQLFactory;
56                  
57                    private:
58                     
59                  
60                      /**  The _TermOperators member variable is an 
61                             array of operators that are valid to operate on Terms in a CQL
62                      expression. 
63                             Valid operators include concatentation, plus and minus.
64 humberto 1.1.2.1     
65                             The array is ordered according to the operation from left to right.
66                        */
67                      
68                      Array<TermOpType> _TermOperators;
69                  
70                      /**  The _CQLTerms member variable is an 
71                             array of operands that are valid in a CQL expression. 
72                      
73                             The array is ordered according to the operation from left to right.
74                        */
75                      Array<CQLTerm> _CQLTerms;
76                  
77                  };
78                  
79                  PEGASUS_NAMESPACE_END
80                  
81                  
82                  #endif /* CQLEXPRESSION_H_HEADER_INCLUDED_BEE5929F */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2