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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2