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

Diff for /pegasus/src/Pegasus/Common/CIMParamValue.cpp between version 1.12.2.1 and 1.24

version 1.12.2.1, 2002/10/28 15:43:21 version 1.24, 2008/12/02 09:00:43
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 //  
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  
 // The Open Group, Tivoli Systems  
 //  
 // Permission is hereby granted, free of charge, to any person obtaining a copy  
 // of this software and associated documentation files (the "Software"), to  
 // deal in the Software without restriction, including without limitation the  
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  
 // sell copies of the Software, and to permit persons to whom the Software is  
 // furnished to do so, subject to the following conditions:  
 //  
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT  
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR  
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT  
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
 // //
 //==============================================================================  // Licensed to The Open Group (TOG) under one or more contributor license
   // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
   // this work for additional information regarding copyright ownership.
   // Each contributor licenses this file to you under the OpenPegasus Open
   // Source License; you may not use this file except in compliance with the
   // License.
   //
   // Permission is hereby granted, free of charge, to any person obtaining a
   // copy of this software and associated documentation files (the "Software"),
   // to deal in the Software without restriction, including without limitation
   // the rights to use, copy, modify, merge, publish, distribute, sublicense,
   // and/or sell copies of the Software, and to permit persons to whom the
   // Software is furnished to do so, subject to the following conditions:
   //
   // The above copyright notice and this permission notice shall be included
   // in all copies or substantial portions of the Software.
   //
   // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  //////////////////////////////////////////////////////////////////////////
 //  
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 44 
Line 46 
  
 CIMParamValue::CIMParamValue(const CIMParamValue& x) CIMParamValue::CIMParamValue(const CIMParamValue& x)
 { {
     Inc(_rep = x._rep);      _rep = x._rep;
       if (_rep)
           _rep->Inc();
 } }
  
 CIMParamValue::CIMParamValue(CIMParamValueRep* rep) CIMParamValue::CIMParamValue(CIMParamValueRep* rep)
Line 56 
Line 60 
 { {
     if (x._rep != _rep)     if (x._rep != _rep)
     {     {
         Dec(_rep);          if (_rep)
         Inc(_rep = x._rep);              _rep->Dec();
           _rep = x._rep;
           if (_rep)
               _rep->Inc();
     }     }
     return *this;     return *this;
 } }
Line 72 
Line 79 
  
 CIMParamValue::~CIMParamValue() CIMParamValue::~CIMParamValue()
 { {
     Dec(_rep);      if (_rep)
           _rep->Dec();
 } }
  
 String CIMParamValue::getParameterName() const String CIMParamValue::getParameterName() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getParameterName();     return _rep->getParameterName();
 } }
  
 CIMValue CIMParamValue::getValue() const CIMValue CIMParamValue::getValue() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getValue();     return _rep->getValue();
 } }
  
 Boolean CIMParamValue::isTyped() const Boolean CIMParamValue::isTyped() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->isTyped();     return _rep->isTyped();
 } }
  
 void CIMParamValue::setParameterName(String& parameterName) void CIMParamValue::setParameterName(String& parameterName)
 { {
     _checkRep();      CheckRep(_rep);
     _rep->setParameterName(parameterName);     _rep->setParameterName(parameterName);
 } }
  
 void CIMParamValue::setValue(CIMValue& value) void CIMParamValue::setValue(CIMValue& value)
 { {
     _checkRep();      CheckRep(_rep);
     _rep->setValue(value);     _rep->setValue(value);
 } }
  
 void CIMParamValue::setIsTyped(Boolean isTyped) void CIMParamValue::setIsTyped(Boolean isTyped)
 { {
     _checkRep();      CheckRep(_rep);
     _rep->setIsTyped(isTyped);     _rep->setIsTyped(isTyped);
 } }
  
 Boolean CIMParamValue::isNull() const  Boolean CIMParamValue::isUninitialized() const
 {  
     return (_rep == 0)? true : false;  
 }  
   
 Boolean CIMParamValue::identical(const CIMParamValue& x) const  
 { {
     x._checkRep();      return _rep == 0;
     _checkRep();  
     return _rep->identical(x._rep);  
 } }
  
 CIMParamValue CIMParamValue::clone() const CIMParamValue CIMParamValue::clone() const
 { {
       CheckRep(_rep);
     return CIMParamValue(_rep->clone());     return CIMParamValue(_rep->clone());
 } }
  
 void CIMParamValue::_checkRep() const  
 {  
     if (!_rep)  
         ThrowUninitializedHandle();  
 }  
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.12.2.1  
changed lines
  Added in v.1.24

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2