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

 1 humberto 1.1.2.1 #ifndef Pegasus_CQLTermRep_h
 2                  #define Pegasus_CQLTermRep_h
 3                  
 4                  #include <Pegasus/Common/Config.h>
 5                  #include <Pegasus/CQL/CQLValue.h>
 6                  #include <Pegasus/CQL/Linkage.h>
 7                  #include <Pegasus/CQL/CQLFactor.h>
 8                  
 9                  PEGASUS_NAMESPACE_BEGIN
10                  
11                  class PEGASUS_CQL_LINKAGE CQLFactory;
12                  class PEGASUS_CQL_LINKAGE QueryContext;
13                  /** The CQLTerm class encapsulates each CQL term in a CQL expression.  
14                  
15                  This class contains an array of CQLFactor objects and an array of CQLOperator
16                  objects.
17                    */
18                  // 
19                  /**
20                    The CQLTerm class encapsulates a generic CQL term to make it 
21                     easier to break into pieces (factors) and process the term.  
22 humberto 1.1.2.1 
23                     A CQL term is made up of factors and operators. 
24                     For example,  'A * B' is a CQLTerm, where 'A' and 'B' are factors, and '*'
25                  is an operator on a factor.
26                  
27                     There must be exactly one more factor than there are operators.
28                    */
29                  class PEGASUS_CQL_LINKAGE CQLTermRep
30                  {
31                    public:
32                     CQLTermRep();
33                      /** constructor takes one CQLFactor object.
34                        */
35                      CQLTermRep(CQLFactor theFactor);
36 humberto 1.1.2.3     CQLTermRep(const CQLTermRep* rep);
37 humberto 1.1.2.1     ~CQLTermRep();
38                  
39                      /**  the getValue method evaluates the CQL term and returns the value.
40                            Any property that need to be resolved into a value is taken from the
41                      CIMInstance.
42                        */
43                      CQLValue resolveValue(CIMInstance CI, QueryContext& QueryCtx);
44                  
45                      /** The appendOperation is used by Bison.
46                            It is invoked 0 or more times for the CQLTerm, and
47                            when invoked will always pass in an integer that is the Factor operation
48                            type and a CQLFactor object.
49                        */
50                      void appendOperation(FactorOpType inFactorOpType, CQLFactor inFactor);
51                  
52                     String toString();
53 chuck    1.1.2.4 
54 humberto 1.1.2.2    Boolean isSimple();
55 chuck    1.1.2.4 
56 humberto 1.1.2.1    Boolean isSimpleValue();
57 chuck    1.1.2.4 
58 humberto 1.1.2.1    Array<CQLFactor> getFactors();
59 chuck    1.1.2.4 
60 humberto 1.1.2.1    Array<FactorOpType> getOperators();
61 chuck    1.1.2.4 
62                     void applyContext(QueryContext& inContext); 
63                  
64 humberto 1.1.2.1    friend class CQLFactory;
65                  
66                    private:
67                      
68                      Array<FactorOpType> _FactorOperators;
69                  
70                      Array<CQLFactor> _Factors;
71                  
72                  };
73                  
74                  PEGASUS_NAMESPACE_END
75                  
76                  #endif 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2