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

  1 martin 1.12 //%LICENSE////////////////////////////////////////////////////////////////
  2             // 
  3             // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9             // 
 10             // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16             // 
 17             // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19             // 
 20             // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21             // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 22 martin 1.12 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 karl   1.9  // 
 28 martin 1.12 //////////////////////////////////////////////////////////////////////////
 29 chuck  1.2  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             #include <Pegasus/CQL/CQLValue.h>
 32             #include <Pegasus/Repository/NameSpaceManager.h>
 33             #include <Pegasus/Common/CIMClass.h>
 34             #include <Pegasus/CQL/CQLIdentifier.h>
 35             #include <Pegasus/CQL/CQLValue.h>
 36 david.dillard 1.7  #include <Pegasus/CQL/CQLValueRep.h>
 37 chuck         1.2  #include <Pegasus/CQL/CQLFactory.h>
 38                    
 39                    
 40                    
 41                    PEGASUS_NAMESPACE_BEGIN
 42                    PEGASUS_USING_STD;
 43                    
 44                    /*
 45                    #define PEGASUS_ARRAY_T CQLValue
 46                    #include <Pegasus/Common/ArrayImpl.h>
 47                    #undef PEGASUS_ARRAY_T
 48                    */
 49                    
 50                    
 51                    #define CIMTYPE_EMBEDDED 15  //temporary
 52                    CQLValue::CQLValue()
 53                    {
 54 david.dillard 1.5     _rep = new CQLValueRep();
 55 chuck         1.2  }
 56                    
 57                    CQLValue::~CQLValue()
 58                    {
 59 david.dillard 1.5     delete _rep;
 60 chuck         1.2  }
 61                    
 62                    CQLValue::CQLValue(const CQLValue& val)
 63                    {
 64                       _rep = new CQLValueRep(val._rep);
 65                    }
 66                    
 67 karl          1.10 CQLValue::CQLValue(const String& inString, NumericType inValueType,
 68                                       Boolean inSign)
 69 chuck         1.2  {
 70                       _rep = new CQLValueRep(inString, inValueType, inSign);
 71                    }
 72                    
 73                    
 74 david.dillard 1.6  CQLValue::CQLValue(const CQLChainedIdentifier& inCQLIdent)
 75 chuck         1.2  {
 76                       _rep = new CQLValueRep(inCQLIdent);
 77                    }
 78                    
 79                    
 80 david.dillard 1.6  CQLValue::CQLValue(const String& inString)
 81 chuck         1.2  {
 82                       _rep = new CQLValueRep(inString);
 83                    }
 84                    
 85 david.dillard 1.6  CQLValue::CQLValue(const CIMInstance& inInstance)
 86 chuck         1.2  {
 87                       _rep = new CQLValueRep(inInstance);
 88                    }
 89                    
 90 david.dillard 1.6  CQLValue::CQLValue(const CIMClass& inClass)
 91 chuck         1.2  {
 92                       _rep = new CQLValueRep(inClass);
 93                    }
 94                    
 95 david.dillard 1.6  CQLValue::CQLValue(const CIMObject& inObject)
 96 chuck         1.2  {
 97                       _rep = new CQLValueRep(inObject);
 98                    }
 99                    
100 david.dillard 1.6  CQLValue::CQLValue(const CIMValue& inVal)
101 chuck         1.2  {
102                       _rep = new CQLValueRep(inVal);
103                    }
104                    
105 david.dillard 1.6  CQLValue::CQLValue(const CIMObjectPath& inObjPath)
106 david.dillard 1.5  {
107 chuck         1.2     _rep = new CQLValueRep(inObjPath);
108                    }
109                    
110 david.dillard 1.6  CQLValue::CQLValue(const CIMDateTime& inDateTime)
111 chuck         1.2  {
112                       _rep = new CQLValueRep(inDateTime);
113                    }
114                    
115                    CQLValue::CQLValue(Uint64 inUint)
116                    {
117                       _rep = new CQLValueRep(inUint);
118                    }
119                    
120                    CQLValue::CQLValue(Boolean inBool)
121                    {
122                       _rep = new CQLValueRep(inBool);
123                    }
124                    
125                    CQLValue::CQLValue(Sint64 inSint)
126                    {
127                       _rep = new CQLValueRep(inSint);
128                    }
129                    
130                    CQLValue::CQLValue(Real64 inReal)
131                    {
132 chuck         1.2     _rep = new CQLValueRep(inReal);
133                    }
134                    
135 david.dillard 1.6  CQLValue::CQLValue(const CQLValueRep& rhs)
136 chuck         1.2  {
137                       _rep = new CQLValueRep(&rhs);
138                    }
139                    
140                    void CQLValue::resolve(const CIMInstance& CI,const QueryContext& inQueryCtx)
141 david.dillard 1.5  {
142 chuck         1.2     _rep->resolve(CI, inQueryCtx);
143                    }
144                    
145                    CQLValue& CQLValue::operator=(const CQLValue& rhs)
146                    {
147 david.dillard 1.5     if(&rhs != this)
148 chuck         1.2     {
149 david.dillard 1.5         delete _rep;
150                           _rep = NULL;
151                           _rep = new CQLValueRep(rhs._rep);
152                       }
153                       return *this;
154 chuck         1.2  }
155 david.dillard 1.5  
156                    Boolean CQLValue::operator==(const CQLValue& x) const
157 chuck         1.2  {
158                       return _rep->operator==(x._rep);
159                    }
160                    
161                    //##ModelId=40FBFF9502BB
162 david.dillard 1.5  Boolean CQLValue::operator!=(const CQLValue& x) const
163 chuck         1.2  {
164                       return _rep->operator!=(x._rep);
165                    }
166                    
167 david.dillard 1.5  Boolean CQLValue::operator<=(const CQLValue& x) const
168 chuck         1.2  {
169                       return _rep->operator<=(x._rep);
170                    }
171                    
172 david.dillard 1.5  Boolean CQLValue::operator>=(const CQLValue& x) const
173 chuck         1.2  {
174                       return _rep->operator>=(x._rep);
175                    }
176                    
177 david.dillard 1.5  Boolean CQLValue::operator<(const CQLValue& x) const
178 chuck         1.2  {
179                       return _rep->operator<(x._rep);
180                    }
181                    
182 david.dillard 1.5  Boolean CQLValue::operator>(const CQLValue& x) const
183 chuck         1.2  {
184                       return _rep->operator>(x._rep);
185                    }
186                    
187                    CQLValue CQLValue::operator+(const CQLValue& x)
188                    {
189                       return CQLValue(_rep->operator+(x._rep));
190                    }
191                    
192                    /*
193                    CQLValue CQLValue::operator-(const CQLValue& x)
194                    {
195                       return CQLValue(_rep->operator-(x._rep));
196                    }
197                    
198                    CQLValue CQLValue::operator*(const CQLValue& x)
199                    {
200                       return CQLValue(_rep->operator*(x._rep));
201                    }
202                    
203                    
204 chuck         1.2  CQLValue CQLValue::operator/(const CQLValue& x)
205                    {
206                       return CQLValue(_rep->operator/(x._rep));
207                    }
208                    */
209 david.dillard 1.5  
210 chuck         1.2  //##ModelId=40FC3F6F0302
211 david.dillard 1.5  CQLValue::CQLValueType CQLValue::getValueType() const
212 chuck         1.2  {
213                       return _rep->getValueType();
214                    }
215                    
216 david.dillard 1.5  Boolean CQLValue::isResolved() const
217 chuck         1.2  {
218                       return _rep->isResolved();
219                    }
220                    
221 david.dillard 1.5  Boolean CQLValue::isNull() const
222 chuck         1.2  {
223                       return _rep->isNull();
224                    }
225                    
226 karl          1.10 Boolean CQLValue::isa(const CQLChainedIdentifier& cid,
227                                          QueryContext& QueryCtx) const
228 chuck         1.2  {
229                       return _rep->isa(cid, QueryCtx);
230                    }
231                    
232 david.dillard 1.5  Boolean CQLValue::like(const CQLValue& inVal) const
233 chuck         1.2  {
234 david.dillard 1.5     return _rep->like(inVal._rep);
235 chuck         1.2  }
236                    
237                    /*
238                    void CQLValue::invert()
239                    {
240                       _rep->invert();
241                    }
242                    */
243                    
244 david.dillard 1.5  CQLChainedIdentifier CQLValue::getChainedIdentifier() const
245 chuck         1.2  {
246                       return _rep->getChainedIdentifier();
247                    }
248                    
249 david.dillard 1.5  Uint64 CQLValue::getUint() const
250 chuck         1.2  {
251                       return _rep->getUint();
252                    }
253                    
254 david.dillard 1.5  Boolean CQLValue::getBool() const
255 chuck         1.2  {
256                       return _rep->getBool();
257                    }
258                    
259 david.dillard 1.5  Sint64 CQLValue::getSint() const
260 chuck         1.2  {
261                       return _rep->getSint();
262                    }
263                    
264 david.dillard 1.5  Real64 CQLValue::getReal() const
265 chuck         1.2  {
266                       return _rep->getReal();
267                    }
268                    
269 david.dillard 1.5  String CQLValue::getString() const
270 chuck         1.2  {
271                       return _rep->getString();
272                    }
273                    
274 david.dillard 1.5  CIMDateTime CQLValue::getDateTime() const
275 chuck         1.2  {
276                       return _rep->getDateTime();
277                    }
278                    
279 david.dillard 1.5  CIMObjectPath CQLValue::getReference() const
280 chuck         1.2  {
281                       return _rep->getReference();
282                    }
283                    
284 david.dillard 1.5  CIMObject CQLValue::getObject() const
285 chuck         1.2  {
286                       return _rep->getObject();
287                    }
288                    
289 david.dillard 1.5  String CQLValue::toString() const
290 chuck         1.2  {
291                       return _rep->toString();
292                    }
293                    
294 vijay.eli     1.8  void CQLValue::applyContext(const QueryContext& _ctx,
295                                                const CQLChainedIdentifier& inCid)
296 chuck         1.2  {
297 david.dillard 1.5     _rep->applyContext(_ctx,inCid);
298 chuck         1.2  }
299                    
300                    
301                    
302                    PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2