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

  1 david 1.1.2.3 #ifndef CQLFACTOR_H_HEADER
  2               #define CQLFACTOR_H_HEADER
  3               //%2004////////////////////////////////////////////////////////////////////////
  4               //
  5               // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L. P.;
  6               // IBM Corp.; EMC Corporation, The Open Group.
  7               //
  8               // Permission is hereby granted, free of charge, to any person obtaining a copy
  9               // of this software and associated documentation files (the "Software"), to
 10               // deal in the Software without restriction, including without limitation the
 11               // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12               // sell copies of the Software, and to permit persons to whom the Software is
 13               // furnished to do so, subject to the following conditions:
 14               // 
 15               // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16               // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17               // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18               // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19               // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20               // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21               // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22 david 1.1.2.3 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23               //
 24               //==============================================================================
 25               //
 26               // Author: Dave Rosckes (rosckes@us.ibm.com)
 27               //
 28               // Modified By:
 29               //
 30               //%/////////////////////////////////////////////////////////////////////////////
 31 humberto 1.1.2.1 
 32                  #include <Pegasus/Common/Config.h>
 33                  #include <Pegasus/CQL/CQLValue.h>
 34 david    1.1.2.2 #include <Pegasus/CQL/CQLScope.h>
 35 humberto 1.1.2.1 #include <Pegasus/CQL/Linkage.h>
 36                  
 37                  PEGASUS_NAMESPACE_BEGIN
 38                  
 39                  class PEGASUS_CQL_LINKAGE CQLExpression;
 40                  class PEGASUS_CQL_LINKAGE CQLFunction;
 41                  
 42                  /**  The CQLFactor could contain a CQLValue, CQLExpression or CQLFunction.
 43                         This class evaluates the object to get a CQLValue.
 44                         If it contains a CQLValue, it will resolve the CQLValue. 
 45                    */
 46 david    1.1.2.3 
 47 humberto 1.1.2.1 class PEGASUS_CQL_LINKAGE CQLFactor
 48                  {
 49                    public:
 50                     CQLFactor(){}
 51 david    1.1.2.2 
 52 humberto 1.1.2.1     CQLFactor(CQLValue inCQLVal);
 53                  
 54                      CQLFactor(CQLExpression& inCQLExp);
 55                  
 56                      CQLFactor(CQLFunction inCQLFunc);
 57 david    1.1.2.2     CQLFactor(const CQLFactor& inCQLFact);
 58 humberto 1.1.2.1 
 59                      ~CQLFactor(){}
 60                  
 61                      /** 
 62                             The CQLFactor could contain a CQLValue, CQLExpression or CQLFunction.
 63                             This method evaluates the object to get a CQLValue.
 64                             If it contains a CQLValue, it will resolve the CQLValue by calling the
 65                      resolve method
 66                             on the CQLValue object. 
 67                      
 68                             If it contains a CQLFunction this method will invoke the getValue method
 69                      on 
 70                             CQLFunction, and the returned value will already be resolved.
 71                      
 72                             If it contains a CQLExpression this method will invoke the getValue
 73                      method on 
 74                             CQLExpression, and the returned value will already be resolved.
 75                      
 76                        */
 77 david    1.1.2.2 
 78 humberto 1.1.2.1     CQLValue getValue(CIMInstance CI, QueryContext& QueryCtx);
 79 david    1.1.2.2    CQLValue resolveValue(CIMInstance CI, QueryContext& QueryCtx);
 80                     Boolean isSimpleValue();
 81                     CQLValue getValue();
 82                     CQLFunction getCQLFunction();
 83                     CQLExpression getCQLExpression();
 84                     String toString();
 85                     void applyScopes(Array<CQLScope> inScopes);
 86 humberto 1.1.2.1 
 87                    private:
 88 david    1.1.2.2 
 89 humberto 1.1.2.1     CQLExpression* _CQLExp;
 90                  
 91                      CQLValue _CQLVal;
 92                  
 93                      CQLFunction* _CQLFunct;
 94                  
 95                      /** if _invert is TRUE, multiply by -1 to invert the value.
 96                        */
 97 david    1.1.2.2 
 98 humberto 1.1.2.1     Boolean _invert;
 99                  
100                  };
101                  
102                  #ifndef PEGASUS_ARRAY_T
103                  #define PEGASUS_ARRAY_T CQLFactor
104                  #include <Pegasus/Common/ArrayInter.h>
105                  #undef PEGASUS_ARRAY_T
106                  #endif
107                  
108                  PEGASUS_NAMESPACE_END
109                  
110 david    1.1.2.3 #endif /* CQLFACTOR_H_HEADER */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2