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

  1 karl  1.9 //%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.9 // 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.9 // 
 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           //%/////////////////////////////////////////////////////////////////////////////
 33           #include <Pegasus/CQL/CQLValue.h>
 34           #include <Pegasus/Repository/NameSpaceManager.h>
 35           #include <Pegasus/Common/CIMClass.h>
 36           #include <Pegasus/CQL/CQLIdentifier.h>
 37           #include <Pegasus/CQL/CQLValue.h>
 38 david.dillard 1.7 #include <Pegasus/CQL/CQLValueRep.h>
 39 chuck         1.2 #include <Pegasus/CQL/CQLFactory.h>
 40                   
 41                   
 42                   
 43                   PEGASUS_NAMESPACE_BEGIN
 44                   PEGASUS_USING_STD;
 45                   
 46                   /*
 47                   #define PEGASUS_ARRAY_T CQLValue
 48                   #include <Pegasus/Common/ArrayImpl.h>
 49                   #undef PEGASUS_ARRAY_T
 50                   */
 51                   
 52                   
 53                   #define CIMTYPE_EMBEDDED 15  //temporary
 54                   CQLValue::CQLValue()
 55                   {
 56 david.dillard 1.5    _rep = new CQLValueRep();
 57 chuck         1.2 }
 58                   
 59                   CQLValue::~CQLValue()
 60                   {
 61 david.dillard 1.5    delete _rep;
 62 chuck         1.2 }
 63                   
 64                   CQLValue::CQLValue(const CQLValue& val)
 65                   {
 66                      _rep = new CQLValueRep(val._rep);
 67                   }
 68                   
 69 karl          1.10 CQLValue::CQLValue(const String& inString, NumericType inValueType,
 70                                       Boolean inSign)
 71 chuck         1.2  {
 72                       _rep = new CQLValueRep(inString, inValueType, inSign);
 73                    }
 74                    
 75                    
 76 david.dillard 1.6  CQLValue::CQLValue(const CQLChainedIdentifier& inCQLIdent)
 77 chuck         1.2  {
 78                       _rep = new CQLValueRep(inCQLIdent);
 79                    }
 80                    
 81                    
 82 david.dillard 1.6  CQLValue::CQLValue(const String& inString)
 83 chuck         1.2  {
 84                       _rep = new CQLValueRep(inString);
 85                    }
 86                    
 87 david.dillard 1.6  CQLValue::CQLValue(const CIMInstance& inInstance)
 88 chuck         1.2  {
 89                       _rep = new CQLValueRep(inInstance);
 90                    }
 91                    
 92 david.dillard 1.6  CQLValue::CQLValue(const CIMClass& inClass)
 93 chuck         1.2  {
 94                       _rep = new CQLValueRep(inClass);
 95                    }
 96                    
 97 david.dillard 1.6  CQLValue::CQLValue(const CIMObject& inObject)
 98 chuck         1.2  {
 99                       _rep = new CQLValueRep(inObject);
100                    }
101                    
102 david.dillard 1.6  CQLValue::CQLValue(const CIMValue& inVal)
103 chuck         1.2  {
104                       _rep = new CQLValueRep(inVal);
105                    }
106                    
107 david.dillard 1.6  CQLValue::CQLValue(const CIMObjectPath& inObjPath)
108 david.dillard 1.5  {
109 chuck         1.2     _rep = new CQLValueRep(inObjPath);
110                    }
111                    
112 david.dillard 1.6  CQLValue::CQLValue(const CIMDateTime& inDateTime)
113 chuck         1.2  {
114                       _rep = new CQLValueRep(inDateTime);
115                    }
116                    
117                    CQLValue::CQLValue(Uint64 inUint)
118                    {
119                       _rep = new CQLValueRep(inUint);
120                    }
121                    
122                    CQLValue::CQLValue(Boolean inBool)
123                    {
124                       _rep = new CQLValueRep(inBool);
125                    }
126                    
127                    CQLValue::CQLValue(Sint64 inSint)
128                    {
129                       _rep = new CQLValueRep(inSint);
130                    }
131                    
132                    CQLValue::CQLValue(Real64 inReal)
133                    {
134 chuck         1.2     _rep = new CQLValueRep(inReal);
135                    }
136                    
137 david.dillard 1.6  CQLValue::CQLValue(const CQLValueRep& rhs)
138 chuck         1.2  {
139                       _rep = new CQLValueRep(&rhs);
140                    }
141                    
142                    void CQLValue::resolve(const CIMInstance& CI,const QueryContext& inQueryCtx)
143 david.dillard 1.5  {
144 chuck         1.2     _rep->resolve(CI, inQueryCtx);
145                    }
146                    
147                    CQLValue& CQLValue::operator=(const CQLValue& rhs)
148                    {
149 david.dillard 1.5     if(&rhs != this)
150 chuck         1.2     {
151 david.dillard 1.5         delete _rep;
152                           _rep = NULL;
153                           _rep = new CQLValueRep(rhs._rep);
154                       }
155                       return *this;
156 chuck         1.2  }
157 david.dillard 1.5  
158                    Boolean CQLValue::operator==(const CQLValue& x) const
159 chuck         1.2  {
160                       return _rep->operator==(x._rep);
161                    }
162                    
163                    //##ModelId=40FBFF9502BB
164 david.dillard 1.5  Boolean CQLValue::operator!=(const CQLValue& x) const
165 chuck         1.2  {
166                       return _rep->operator!=(x._rep);
167                    }
168                    
169 david.dillard 1.5  Boolean CQLValue::operator<=(const CQLValue& x) const
170 chuck         1.2  {
171                       return _rep->operator<=(x._rep);
172                    }
173                    
174 david.dillard 1.5  Boolean CQLValue::operator>=(const CQLValue& x) const
175 chuck         1.2  {
176                       return _rep->operator>=(x._rep);
177                    }
178                    
179 david.dillard 1.5  Boolean CQLValue::operator<(const CQLValue& x) const
180 chuck         1.2  {
181                       return _rep->operator<(x._rep);
182                    }
183                    
184 david.dillard 1.5  Boolean CQLValue::operator>(const CQLValue& x) const
185 chuck         1.2  {
186                       return _rep->operator>(x._rep);
187                    }
188                    
189                    CQLValue CQLValue::operator+(const CQLValue& x)
190                    {
191                       return CQLValue(_rep->operator+(x._rep));
192                    }
193                    
194                    /*
195                    CQLValue CQLValue::operator-(const CQLValue& x)
196                    {
197                       return CQLValue(_rep->operator-(x._rep));
198                    }
199                    
200                    CQLValue CQLValue::operator*(const CQLValue& x)
201                    {
202                       return CQLValue(_rep->operator*(x._rep));
203                    }
204                    
205                    
206 chuck         1.2  CQLValue CQLValue::operator/(const CQLValue& x)
207                    {
208                       return CQLValue(_rep->operator/(x._rep));
209                    }
210                    */
211 david.dillard 1.5  
212 chuck         1.2  //##ModelId=40FC3F6F0302
213 david.dillard 1.5  CQLValue::CQLValueType CQLValue::getValueType() const
214 chuck         1.2  {
215                       return _rep->getValueType();
216                    }
217                    
218                    void CQLValue::setNull()
219                    {
220                       _rep->setNull();
221                    }
222                    
223 david.dillard 1.5  Boolean CQLValue::isResolved() const
224 chuck         1.2  {
225                       return _rep->isResolved();
226                    }
227                    
228 david.dillard 1.5  Boolean CQLValue::isNull() const
229 chuck         1.2  {
230                       return _rep->isNull();
231                    }
232                    
233 karl          1.10 Boolean CQLValue::isa(const CQLChainedIdentifier& cid,
234                                          QueryContext& QueryCtx) const
235 chuck         1.2  {
236                       return _rep->isa(cid, QueryCtx);
237                    }
238                    
239 david.dillard 1.5  Boolean CQLValue::like(const CQLValue& inVal) const
240 chuck         1.2  {
241 david.dillard 1.5     return _rep->like(inVal._rep);
242 chuck         1.2  }
243                    
244                    /*
245                    void CQLValue::invert()
246                    {
247                       _rep->invert();
248                    }
249                    */
250                    
251 david.dillard 1.5  CQLChainedIdentifier CQLValue::getChainedIdentifier() const
252 chuck         1.2  {
253                       return _rep->getChainedIdentifier();
254                    }
255                    
256 david.dillard 1.5  Uint64 CQLValue::getUint() const
257 chuck         1.2  {
258                       return _rep->getUint();
259                    }
260                    
261 david.dillard 1.5  Boolean CQLValue::getBool() const
262 chuck         1.2  {
263                       return _rep->getBool();
264                    }
265                    
266 david.dillard 1.5  Sint64 CQLValue::getSint() const
267 chuck         1.2  {
268                       return _rep->getSint();
269                    }
270                    
271 david.dillard 1.5  Real64 CQLValue::getReal() const
272 chuck         1.2  {
273                       return _rep->getReal();
274                    }
275                    
276 david.dillard 1.5  String CQLValue::getString() const
277 chuck         1.2  {
278                       return _rep->getString();
279                    }
280                    
281 david.dillard 1.5  CIMDateTime CQLValue::getDateTime() const
282 chuck         1.2  {
283                       return _rep->getDateTime();
284                    }
285                    
286 david.dillard 1.5  CIMObjectPath CQLValue::getReference() const
287 chuck         1.2  {
288                       return _rep->getReference();
289                    }
290                    
291 david.dillard 1.5  CIMObject CQLValue::getObject() const
292 chuck         1.2  {
293                       return _rep->getObject();
294                    }
295                    
296 david.dillard 1.5  String CQLValue::toString() const
297 chuck         1.2  {
298                       return _rep->toString();
299                    }
300                    
301 vijay.eli     1.8  void CQLValue::applyContext(const QueryContext& _ctx,
302                                                const CQLChainedIdentifier& inCid)
303 chuck         1.2  {
304 david.dillard 1.5     _rep->applyContext(_ctx,inCid);
305 chuck         1.2  }
306                    
307                    
308                    
309                    PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2