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

  1 karl  1.8 //%2006////////////////////////////////////////////////////////////////////////
  2 chuck 1.2 //
  3 karl  1.5 // 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.5 // 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.8 // 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           // 
 21           // 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           // Authors: David Rosckes (rosckes@us.ibm.com)
 33           //          Bert Rivero (hurivero@us.ibm.com)
 34 chuck 1.2 //          Chuck Carmack (carmack@us.ibm.com)
 35           //          Brian Lucier (lucier@us.ibm.com) 
 36           //
 37 aruran.ms 1.7 // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3591
 38 chuck     1.2 //
 39               //%/////////////////////////////////////////////////////////////////////////////
 40               
 41               #include <Pegasus/CQL/CQLTerm.h>  
 42               #include <Pegasus/CQL/CQLTermRep.h>
 43               #include <Pegasus/CQL/CQLFactory.h>
 44               #include <Pegasus/Query/QueryCommon/QueryContext.h>
 45               PEGASUS_NAMESPACE_BEGIN
 46               
 47               /*
 48               #define PEGASUS_ARRAY_T FactorOpType
 49               #include <Pegasus/Common/ArrayImpl.h>
 50               #undef PEGASUS_ARRAY_T
 51               
 52               #define PEGASUS_ARRAY_T CQLTerm
 53               #include <Pegasus/Common/ArrayImpl.h>
 54               #undef PEGASUS_ARRAY_T
 55               */
 56               
 57               
 58               CQLTerm::CQLTerm()
 59 chuck     1.2 {
 60                 _rep = new CQLTermRep();
 61               }
 62               
 63               CQLTerm::CQLTerm(const CQLTerm& inTerm)
 64               {
 65                 _rep = new CQLTermRep(*inTerm._rep);
 66               }
 67               
 68               CQLTerm::CQLTerm(const CQLFactor& theFactor)
 69               {
 70                 _rep = new CQLTermRep(theFactor);
 71               }
 72               
 73               CQLTerm::~CQLTerm()
 74               {
 75                 if(_rep)
 76                   delete _rep;
 77               }
 78               
 79               CQLValue CQLTerm::resolveValue(const CIMInstance& CI, const QueryContext& QueryCtx)
 80 chuck     1.2 {
 81                 return _rep->resolveValue(CI,QueryCtx);
 82               }
 83               
 84 aruran.ms 1.7 void CQLTerm::appendOperation(FactorOpType inFactorOpType, const CQLFactor& inFactor)
 85 chuck     1.2 {
 86                 _rep->appendOperation(inFactorOpType,inFactor);
 87               }
 88               
 89               String CQLTerm::toString()const
 90               {
 91                 return _rep->toString();
 92               }
 93               
 94               Boolean CQLTerm::isSimple()const
 95               {
 96                 return _rep->isSimple();
 97               }
 98               
 99               Boolean CQLTerm::isSimpleValue()const
100               {
101                 return _rep->isSimpleValue();
102               }
103               
104               Array<CQLFactor> CQLTerm::getFactors()const
105               {
106 chuck     1.2   return _rep->getFactors();
107               }
108               
109               Array<FactorOpType> CQLTerm::getOperators()const
110               {
111                 return _rep->getOperators();
112               }
113               
114 vijay.eli 1.6 void CQLTerm::applyContext(const QueryContext& inContext,
115                                          const CQLChainedIdentifier& inCid)
116 chuck     1.2 {
117                 _rep->applyContext(inContext,inCid);
118               }
119               
120               CQLTerm& CQLTerm::operator=(const CQLTerm& rhs)
121               {
122                 if(&rhs != this){
123                   if(_rep) delete _rep;
124                   _rep = new CQLTermRep(*rhs._rep);
125                 }
126                 return *this;
127               }
128 humberto  1.4 /*
129 chuck     1.2 Boolean CQLTerm::operator==(const CQLTerm& rhs)const
130               {
131 humberto  1.3   return (*_rep == *(rhs._rep));
132 chuck     1.2 }
133               Boolean CQLTerm::operator!=(const CQLTerm& rhs)const
134               {
135                 return (!operator==(rhs));                                                                                
136               }
137 humberto  1.4 */
138 chuck     1.2 PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2