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

  1 humberto 1.1.2.1 #ifndef CQLEXPRESSION_H_HEADER_INCLUDED_BEE5929F
  2                  #define CQLEXPRESSION_H_HEADER_INCLUDED_BEE5929F
  3                  
  4                  #include <Pegasus/Common/Config.h>
  5                  #include <Pegasus/CQL/CQLValue.h>
  6                  
  7                  
  8                  #include <Pegasus/CQL/Linkage.h>
  9                  #include <Pegasus/CQL/CQLTerm.h>
 10                  #define MAXFACTORS 50
 11                  PEGASUS_NAMESPACE_BEGIN
 12                  
 13                  
 14                  /**  The enum is private, but the definition is public.
 15                        */
 16                      //##ModelId=40FC040E0079
 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                  //##ModelId=40FC03230150
 36                  class PEGASUS_CQL_LINKAGE CQLExpression
 37                  {
 38                    public:
 39                     CQLExpression(){}
 40                      /** constructor takes one CQLTerm object.
 41                        */
 42                      //##ModelId=40FD308002EE
 43                      CQLExpression(CQLTerm& theTerm);
 44 david    1.1.2.2    CQLExpression(const CQLExpression& inExpress);
 45 humberto 1.1.2.1     /**  the getValue method evaluates the expression and returns the value.
 46                            Any property that need to be resolved into a value is taken from the
 47                      CIMInstance.
 48                        */
 49                      ~CQLExpression(){}
 50                  
 51                      //##ModelId=40FC0323015B
 52 david    1.1.2.3     CQLValue resolveValue(CIMInstance CI, QueryContext& QueryCtx);
 53 humberto 1.1.2.1 
 54                      /** The appendOperation is used by Bison.
 55                            It is invoked 0 or more times for the CQLExpression, and
 56                            when invoked will always pass in an integer that is the Term operation
 57                            type and a CQLTerm object.
 58                        */
 59                      //##ModelId=40FD30BB03C3
 60                      void appendOperation(TermOpType theTermOpType, CQLTerm& theTerm);
 61                  
 62 david    1.1.2.2    String toString();
 63 david    1.1.2.3    Boolean isSimpleValue();
 64                     Array<CQLTerm> getTerms();
 65                     Array<TermOpType> getOperators();
 66                     void applyScopes(Array<CQLScope> inScopes);
 67 david    1.1.2.2 
 68 humberto 1.1.2.1   private:
 69                     
 70                  
 71                      /**  The _TermOperators member variable is an 
 72                             array of operators that are valid to operate on Terms in a CQL
 73                      expression. 
 74                             Valid operators include concatentation, plus and minus.
 75                      
 76                             The array is ordered according to the operation from left to right.
 77                        */
 78                      //##ModelId=40FC036B036A
 79 david    1.1.2.3     
 80                      Array<TermOpType> _TermOperators;
 81 humberto 1.1.2.1 
 82                      /**  The _CQLTerms member variable is an 
 83                             array of operands that are valid in a CQL expression. 
 84                      
 85                             The array is ordered according to the operation from left to right.
 86                        */
 87                      //##ModelId=40FC2F2C0341
 88                      Array<CQLTerm> _CQLTerms;
 89                  
 90                  };
 91                  
 92                  #ifndef PEGASUS_ARRAY_T
 93                  #define PEGASUS_ARRAY_T CQLExpression
 94                  #include <Pegasus/Common/ArrayInter.h>
 95                  #undef PEGASUS_ARRAY_T
 96                  #endif
 97                  
 98                  PEGASUS_NAMESPACE_END
 99                  
100                  
101                  #endif /* CQLEXPRESSION_H_HEADER_INCLUDED_BEE5929F */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2