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

  1 karl  1.7 //%2006////////////////////////////////////////////////////////////////////////
  2 chuck 1.2 //
  3 karl  1.4 // 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 chuck 1.2 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.4 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9           // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.7 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 chuck 1.2 //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // of this software and associated documentation files (the "Software"), to
 16           // deal in the Software without restriction, including without limitation the
 17           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18           // sell copies of the Software, and to permit persons to whom the Software is
 19           // furnished to do so, subject to the following conditions:
 20 karl  1.7 // 
 21 chuck 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29           //
 30           //==============================================================================
 31           //
 32           // Author: Dave Rosckes (rosckes@us.ibm.com)
 33           //
 34 david.dillard 1.5 // Modified By: David Dillard, VERITAS Software Corp.
 35                   //                  (david.dillard@veritas.com)
 36 vijay.eli     1.6 //              Vijay Eli, IBM (vijayeli@in.ibm.com) bug#3590
 37 chuck         1.2 //
 38                   //%/////////////////////////////////////////////////////////////////////////////
 39                   
 40                   #ifndef CQLFACTOR_H_HEADER
 41                   #define CQLFACTOR_H_HEADER
 42                   
 43 david.dillard 1.5 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
 44                   
 45                   #include <Pegasus/CQL/Linkage.h>
 46 chuck         1.2 #include <Pegasus/Common/CIMInstance.h>
 47                   #include <Pegasus/CQL/CQLChainedIdentifier.h>
 48                   #include <Pegasus/Common/ArrayInternal.h>
 49                   
 50                   PEGASUS_NAMESPACE_BEGIN
 51 mike          1.8 class CQLFactory;
 52                   class CQLExpression;
 53                   class CQLFunction;
 54                   class CQLFactorRep;
 55                   class CQLValue;
 56                   class QueryContext;
 57 chuck         1.2 
 58                   /**  The CQLFactor could contain a CQLValue, CQLExpression or CQLFunction.
 59                        This class evaluates the object to get a CQLValue.
 60 david.dillard 1.5      If it contains a CQLValue, it will resolve the CQLValue.
 61 chuck         1.2 */
 62                   
 63                   class PEGASUS_CQL_LINKAGE CQLFactor
 64                   {
 65                    public:
 66                   
 67 david.dillard 1.5   /**
 68 chuck         1.2       Contructs CQLFactor default object.
 69 david.dillard 1.5 
 70 chuck         1.2       @param  - None.
 71                         @return - None.
 72                         @throw  - None.
 73                         <I><B>Experimental Interface</B></I><BR>
 74                     */
 75                     CQLFactor();
 76 david.dillard 1.5 
 77                     /**
 78 chuck         1.2       Contructs CQLFactor from a CQLValue.
 79 david.dillard 1.5 
 80 chuck         1.2       @param  - inCQLVal - The CQLValue used to construct the CQLFactor.
 81                         @return - None.
 82                         @throw  - None.
 83                         <I><B>Experimental Interface</B></I><BR>
 84                     */
 85                     CQLFactor(const CQLValue& inCQLVal);
 86 david.dillard 1.5 
 87                     /**
 88 chuck         1.2       Contructs CQLFactor from a CQLExpression object.
 89 david.dillard 1.5 
 90 chuck         1.2       @param  - inCQLExp - The CQLExpression used to construct the CQLFactor.
 91                         @return - None.
 92                         @throw  - None.
 93                         <I><B>Experimental Interface</B></I><BR>
 94                     */
 95                     CQLFactor(const CQLExpression& inCQLExp);
 96 david.dillard 1.5 
 97                     /**
 98 chuck         1.2       Contructs CQLFactor from a CQLFunction object.
 99 david.dillard 1.5 
100 chuck         1.2       @param  - inCQLFunc - The CQLFunction used to construct the CQLFactor.
101                         @return - None.
102                         @throw  - None.
103                         <I><B>Experimental Interface</B></I><BR>
104                     */
105                     CQLFactor(const CQLFunction& inCQLFunc);
106 david.dillard 1.5 
107                     /**
108 chuck         1.2       Contructs CQLFactor from a CQLFactor object (copy-constructor).
109 david.dillard 1.5 
110 chuck         1.2       @param  - inCQLFact - The CQLFactor used to construct the CQLFactor.
111                         @return - None.
112                         @throw  - None.
113                         <I><B>Experimental Interface</B></I><BR>
114                     */
115                     CQLFactor(const CQLFactor& inCQLFact);
116 david.dillard 1.5 
117                     /**
118 chuck         1.2       Destroyes the CQLFactor object.
119 david.dillard 1.5 
120 chuck         1.2       @param  - None.
121                         @return - None.
122                         @throw  - None.
123                         <I><B>Experimental Interface</B></I><BR>
124                     */
125                     ~CQLFactor();
126 david.dillard 1.5 
127                     /**
128 chuck         1.2       The CQLFactor could contain a CQLValue, CQLExpression or CQLFunction.
129                         This method evaluates the object to get a CQLValue.
130                         If it contains a CQLValue, it will resolve the CQLValue by calling the
131                         resolve method
132 david.dillard 1.5       on the CQLValue object.
133                   
134 chuck         1.2       If it contains a CQLFunction this method will invoke the getValue method
135 david.dillard 1.5       on
136 chuck         1.2       CQLFunction, and the returned value will already be resolved.
137 david.dillard 1.5 
138 chuck         1.2       If it contains a CQLExpression this method will invoke the getValue
139 david.dillard 1.5       method on
140                         CQLExpression, and the returned value will already be resolved.
141                   
142 chuck         1.2       @param  - CI - The CIMInstance to be evaluated.
143                         @param  - QueryCtx - The QueryContext contains specific information about the query.
144                         @return - The primitive CQLValue.
145                         @throw  - CQLSyntaxErrorException.
146                         <I><B>Experimental Interface</B></I><BR>
147                     */
148                     CQLValue resolveValue(const CIMInstance& CI, const QueryContext& QueryCtx);
149 david.dillard 1.5 
150                     /**
151 chuck         1.2       Will return true if the object has only one CQLValue object within it..
152 david.dillard 1.5 
153 chuck         1.2       @param  - None.
154                         @return - true or false.
155                         @throw  - None.
156                         <I><B>Experimental Interface</B></I><BR>
157                     */
158                     Boolean isSimple()const;
159 david.dillard 1.5 
160                     /**
161 chuck         1.2       Will return true if the object has only one CQLValue object within it.
162 david.dillard 1.5 
163 chuck         1.2       @param  - None.
164                         @return - true or false.
165                         @throw  - None.
166                         <I><B>Experimental Interface</B></I><BR>
167                     */
168                     Boolean isSimpleValue()const;
169 david.dillard 1.5 
170                     /**
171 chuck         1.2       Retrieves the CQLValue from the CQLFactor object.
172 david.dillard 1.5       NOTE: If CQLValue has not been set for this object, a
173 chuck         1.2       default object will be returned.
174                   
175                         @param  - None.
176                         @return - The CQLValue.
177                         @throw  - None.
178                         <I><B>Experimental Interface</B></I><BR>
179                     */
180                     CQLValue getValue()const;
181 david.dillard 1.5 
182                     /**
183 chuck         1.2       Retrieves the CQLFunciton from the CQLFactor object.
184 david.dillard 1.5       NOTE: If CQLFunction has not been set for this object, a
185 chuck         1.2       default object will be returned.
186 david.dillard 1.5 
187 chuck         1.2       @param  - None.
188                         @return - The CQLFucntion
189                         @throw  - None.
190                         <I><B>Experimental Interface</B></I><BR>
191                     */
192                     CQLFunction getCQLFunction()const;
193 david.dillard 1.5 
194                     /**
195 chuck         1.2       Retrieves the CQLExpression from the CQLFactor object.
196 david.dillard 1.5       NOTE: If CQLExpression has not been set for this object, a
197 chuck         1.2       default object will be returned.
198 david.dillard 1.5 
199 chuck         1.2       @param  - None.
200                         @return - The CQLFucntion
201                         @throw  - None.
202                         <I><B>Experimental Interface</B></I><BR>
203                     */
204                     CQLExpression getCQLExpression()const;
205 david.dillard 1.5 
206                     /**
207 chuck         1.2       Returns a string representation of the object.
208 david.dillard 1.5 
209 chuck         1.2       @param  - None.
210                         @return - A string
211                         @throw  - None.
212                         <I><B>Experimental Interface</B></I><BR>
213                     */
214                     String toString()const;
215 david.dillard 1.5 
216                     /**
217 chuck         1.2       Calling applyContext function for every internal object.  This
218                         will fully qualify the Chained Identifiers within all the CQLValue objects.
219 david.dillard 1.5 
220 chuck         1.2       @param  - inContext - Query Context used to access the repository.
221                         @param  - inCid - Chained Identifier used for standalone symbolic constants.
222                         @return - None.
223                         @throw  - None.
224                         <I><B>Experimental Interface</B></I><BR>
225                     */
226 vijay.eli     1.6   void applyContext(const QueryContext& inContext,
227                   		    const CQLChainedIdentifier& inCid);
228 chuck         1.2 
229 david.dillard 1.5   /**
230 chuck         1.2       Assignment operation
231 david.dillard 1.5 
232 chuck         1.2       @param  - rhs - CQLFactor to be assigned
233                         @return - the assigned value.
234                         @throw  - None.
235                         <I><B>Experimental Interface</B></I><BR>
236                     */
237                     CQLFactor& operator=(const CQLFactor& rhs);
238 david.dillard 1.5 
239                     /**
240 chuck         1.2       Compare to CQLFactors for equality
241 david.dillard 1.5 
242 chuck         1.2       @param  - expr - rightside value of operation
243                         @return - true or false.
244                         @throw  - None.
245                         <I><B>Experimental Interface</B></I><BR>
246                     */
247 humberto      1.3   /*
248 chuck         1.2   Boolean operator==(const CQLFactor& factor)const;
249 humberto      1.3   */
250 david.dillard 1.5   /**
251 chuck         1.2       Compare to CQLFactors for non-equality
252 david.dillard 1.5 
253 chuck         1.2       @param  - expr - rightside value of operation
254                         @return - true or false.
255                         @throw  - None.
256                         <I><B>Experimental Interface</B></I><BR>
257                     */
258 humberto      1.3   /*
259 chuck         1.2   Boolean operator!=(const CQLFactor& factor)const;
260 humberto      1.3   */
261 chuck         1.2   friend class CQLFactory;
262                    private:
263 david.dillard 1.5 
264 chuck         1.2   CQLFactorRep *_rep;
265                   };
266                   
267                   /*
268                   #ifndef PEGASUS_ARRAY_T
269                   #define PEGASUS_ARRAY_T CQLFactor
270                   #include <Pegasus/Common/ArrayInter.h>
271                   #undef PEGASUS_ARRAY_T
272                   #endif
273                   */
274                   
275                   PEGASUS_NAMESPACE_END
276                   #endif
277                   #endif /* CQLFACTOR_H_HEADER */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2