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

  1 chuck 1.1.2.5 //%2003////////////////////////////////////////////////////////////////////////
  2               //
  3               // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
  4               // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
  5               // Copyright (c) 2003 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 chuck 1.1.2.5 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23               //
 24               //==============================================================================
 25               //
 26               // Authors: David Rosckes (rosckes@us.ibm.com)
 27               //          Bert Rivero (hurivero@us.ibm.com)
 28               //          Chuck Carmack (carmack@us.ibm.com)
 29               //          Brian Lucier (lucier@us.ibm.com) 
 30               //
 31               // Modified By:
 32               //
 33               //%/////////////////////////////////////////////////////////////////////////////
 34               
 35 humberto 1.1.2.1 #ifndef Pegasus_CQLTermRep_h
 36                  #define Pegasus_CQLTermRep_h
 37                  
 38                  #include <Pegasus/Common/Config.h>
 39                  #include <Pegasus/CQL/CQLValue.h>
 40                  #include <Pegasus/CQL/Linkage.h>
 41                  #include <Pegasus/CQL/CQLFactor.h>
 42                  
 43                  PEGASUS_NAMESPACE_BEGIN
 44                  
 45                  class PEGASUS_CQL_LINKAGE CQLFactory;
 46                  class PEGASUS_CQL_LINKAGE QueryContext;
 47                  
 48                  /**
 49 david    1.1.2.9     The CQLTerm class encapsulates a generic CQL term to make it 
 50                      easier to break into pieces (factors) and process the term.  
 51                      A CQL term is made up of factors and operators. 
 52                      There must be exactly one more factor than there are operators.
 53                  */
 54                  class PEGASUS_CQL_LINKAGE CQLTermRep
 55                  {
 56                   public:
 57                    
 58                    /** 
 59                        Contructs CQLTermRep default object.
 60                        
 61                        @param  - None.
 62                        @return - None.
 63                        @throw  - None.
 64                        @experimental
 65                    */
 66                    CQLTermRep();
 67                  
 68                    /** 
 69                        Contructs CQLTermRep from a CQLFactor object.
 70 david    1.1.2.9       
 71                        @param  - theFactor is a CQLFactor object.
 72                        @return - None.
 73                        @throw  - None.
 74                        @experimental
 75                    */
 76                    CQLTermRep(const CQLFactor & theFactor);
 77 humberto 1.1.2.1 
 78 david    1.1.2.9   /** 
 79                        Contructs CQLTermRep from a CQLTermRep object. (copy-constructor)
 80                        
 81                        @param  - rep is a CQLTermRep object.
 82                        @return - None.
 83                        @throw  - None.
 84                        @experimental
 85                    */
 86                    CQLTermRep(const CQLTermRep& rep);
 87 humberto 1.1.2.1 
 88 david    1.1.2.9   /** 
 89                        Destroyes CQLTermRep object.
 90                       
 91                        @param  - None.
 92                        @return - None.
 93                        @throw  - None.
 94                        @experimental
 95                    */
 96                    ~CQLTermRep();
 97                  
 98                    /** the resolveValue method evaluates the CQL Term and returns the value.
 99                        Any property that need to be resolved into a value is taken from the
100                        CIMInstance.
101                        
102                        @param  - CI - The CIMInstance used for the evaluate.
103                        @param  - QueryCtx - Reference to the Querycontext object.
104                        @return - CQLValue - The value of the object being resolved.
105                        @throw  - CQLRuntimeException 
106                        @experimental
107                    */
108                    CQLValue resolveValue(const CIMInstance& CI, const QueryContext& QueryCtx);
109 david    1.1.2.9 
110                    /** The function is used by Bison.
111                        It is invoked 0 or more times for the CQLTerm, and
112                        when invoked will always pass in an integer that is the Factor operation
113                        type and a CQLFactor object.
114                       
115                        @param  - inFactorOpType - next operation to be performed.
116                        @param  - inFactor - next CQLFactor to be operated on.
117                        @return - None.
118                        @throw  - None.
119                        @experimental
120 humberto 1.1.2.1   */
121                      void appendOperation(FactorOpType inFactorOpType, CQLFactor inFactor);
122                  
123 david    1.1.2.9   /** 
124                        Converts the contents of the object to a String.
125                        
126                        @param  - None.
127                        @return - A string version of the object.
128                        @throw  - None.
129                        @experimental
130                    */
131 humberto 1.1.2.7    String toString()const;
132 chuck    1.1.2.4 
133 david    1.1.2.9   /** 
134                        Returns true if the object is simple.  Simple is defined as only having
135                        a one CQLFactor object. The CQLFactor object could be complex.
136                        
137                        @param  - None.
138                        @return - true or false
139                        @throw  - None.
140                        @experimental
141                    */
142 humberto 1.1.2.7    Boolean isSimple()const;
143 chuck    1.1.2.4 
144 david    1.1.2.9   /** 
145                        Returns true if the value within the object is Simple.  In this case
146                        the object only has one CQLFactor object.  This CQLFactor object in 
147                        not a complex object.
148                        
149                        @param  - None.
150                        @return - true or false
151                        @throw  - None.
152                        @experimental
153                    */
154 humberto 1.1.2.7    Boolean isSimpleValue()const;
155 chuck    1.1.2.4 
156 david    1.1.2.9   /** 
157                        Will return an array of CQLFactors.
158                        
159                        @param  - None.
160                        @return - An array of CQLFactor
161                        @throw  - None.
162                        @experimental
163                    */
164 humberto 1.1.2.7    Array<CQLFactor> getFactors()const;
165 chuck    1.1.2.4 
166 david    1.1.2.9   /** 
167                        Will return an array of Operations.
168                        
169                        @param  - None.
170                        @return - an array of FactorOpType
171                        @throw  - None.
172                        @experimental
173                    */
174 humberto 1.1.2.7    Array<FactorOpType> getOperators()const;
175 chuck    1.1.2.4 
176 david    1.1.2.9   /** 
177                        Calling applyContext function for every internal object.  This
178                        will fully qualify the Chained Identifiers within all the CQLValue objects.
179                        
180                        @param  - inContext - Query Context used to access the repository.
181                        @param  - inCid - Chained Identifier used for standalone symbolic constants.
182                        @return - None.
183                        @throw  - None.
184                        @experimental
185                    */
186 david    1.1.2.6    void applyContext(QueryContext& inContext,
187                                       CQLChainedIdentifier& inCid); 
188 chuck    1.1.2.4 
189 humberto 1.1.2.1    friend class CQLFactory;
190                  
191                    private:
192                      
193                      Array<FactorOpType> _FactorOperators;
194                  
195                      Array<CQLFactor> _Factors;
196                  
197                  };
198                  
199                  PEGASUS_NAMESPACE_END
200                  
201                  #endif 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2