(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                      CQLTermRep(const CQLTermRep& rep);
37                      ~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 humberto 1.1.2.1     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                     Boolean isSimpleValue();
54                     Array<CQLFactor> getFactors();
55                     Array<FactorOpType> getOperators();
56                     void applyScopes(Array<CQLScope> inScope); 
57                     friend class CQLFactory;
58                  
59                    private:
60                      
61                      Array<FactorOpType> _FactorOperators;
62                  
63                      Array<CQLFactor> _Factors;
64 humberto 1.1.2.1 
65                  };
66                  
67                  PEGASUS_NAMESPACE_END
68                  
69                  #endif 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2