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

  1 chuck 1.1.2.9 //%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.9 // 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 david 1.1.2.3 #include <Pegasus/CQL/CQLTerm.h>
 36 humberto 1.1.2.5 #include <Pegasus/CQL/CQLTermRep.h>
 37 humberto 1.1.2.4 #include <Pegasus/CQL/CQLFactory.h>
 38 humberto 1.1.2.5 #include <Pegasus/CQL/QueryContext.h>
 39 humberto 1.1.2.1 PEGASUS_NAMESPACE_BEGIN
 40 david    1.1.2.3 
 41                  #define PEGASUS_ARRAY_T FactorOpType
 42                  #include <Pegasus/Common/ArrayImpl.h>
 43                  #undef PEGASUS_ARRAY_T
 44                  
 45 humberto 1.1.2.1 #define PEGASUS_ARRAY_T CQLTerm
 46                  #include <Pegasus/Common/ArrayImpl.h>
 47                  #undef PEGASUS_ARRAY_T
 48                  
 49 david    1.1.2.3 
 50 humberto 1.1.2.7 CQLTerm::CQLTerm(){
 51                  	_rep = new CQLTermRep();
 52 humberto 1.1.2.5 }
 53                  
 54                  CQLTerm::CQLTerm(const CQLTerm& inTerm){
 55 humberto 1.1.2.7 	_rep = new CQLTermRep(inTerm._rep);
 56 humberto 1.1.2.5 }
 57 david    1.1.2.3 
 58 humberto 1.1.2.1 CQLTerm::CQLTerm(CQLFactor theFactor)
 59                  {
 60 humberto 1.1.2.5 	_rep = new CQLTermRep(theFactor);
 61                  }
 62                  
 63                  CQLTerm::~CQLTerm(){
 64                          if(_rep)
 65                                  delete _rep;
 66 humberto 1.1.2.1 }
 67                  
 68 david    1.1.2.2 CQLValue CQLTerm::resolveValue(CIMInstance CI, QueryContext& QueryCtx)
 69 humberto 1.1.2.1 {
 70 humberto 1.1.2.5 	return _rep->resolveValue(CI,QueryCtx);
 71 humberto 1.1.2.1 }
 72                  
 73                  void CQLTerm::appendOperation(FactorOpType inFactorOpType, CQLFactor inFactor)
 74                  {
 75 humberto 1.1.2.5 	_rep->appendOperation(inFactorOpType,inFactor);
 76 humberto 1.1.2.1 }
 77                  
 78 david    1.1.2.2 String CQLTerm::toString()
 79                  {
 80 humberto 1.1.2.5    return _rep->toString();
 81 david    1.1.2.2 }
 82                  
 83 humberto 1.1.2.6 Boolean CQLTerm::isSimple()
 84                  {
 85                     return _rep->isSimple();
 86                  }
 87                  
 88 david    1.1.2.2 Boolean CQLTerm::isSimpleValue()
 89                  {
 90 humberto 1.1.2.5    return _rep->isSimpleValue();
 91 david    1.1.2.2 }
 92                  
 93 david    1.1.2.3 Array<CQLFactor> CQLTerm::getFactors()
 94 david    1.1.2.2 {
 95 humberto 1.1.2.5    return _rep->getFactors();
 96 david    1.1.2.2 }
 97                  
 98                  Array<FactorOpType> CQLTerm::getOperators()
 99                  {
100 humberto 1.1.2.5    return _rep->getOperators();
101 david    1.1.2.2 }
102                  
103 david    1.1.2.10 void CQLTerm::applyContext(QueryContext& inContext,
104                                              CQLChainedIdentifier& inCid)
105 david    1.1.2.2  {
106 david    1.1.2.10   _rep->applyContext(inContext,inCid);
107 david    1.1.2.2  }
108                   
109 humberto 1.1.2.7  CQLTerm& CQLTerm::operator=(const CQLTerm& rhs){
110                   	if(&rhs != this){
111                   		if(_rep) delete _rep;
112                   		_rep = new CQLTermRep(rhs._rep);
113                   	}
114                   	return *this;
115                   
116                   }
117                   
118 humberto 1.1.2.1  PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2