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

Diff for /pegasus/src/Pegasus/Common/CIMObject.cpp between version 1.23 and 1.40

version 1.23, 2002/07/30 16:14:53 version 1.40, 2007/03/27 17:31:31
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // The Open Group, Tivoli Systems  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 21 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Carol Ann Krug Graves, Hewlett-Packard Company  
 //                  (carolann_graves@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "CIMClassRep.h" #include "CIMClassRep.h"
Line 84 
Line 86 
     return *this;     return *this;
 } }
  
 CIMObject& CIMObject::operator=(const CIMClass& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMObject& CIMObject::operator=(const CIMInstance& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMObject::~CIMObject() CIMObject::~CIMObject()
 { {
     Dec(_rep);     Dec(_rep);
Line 140 
Line 122 
     return _rep->findQualifier(name);     return _rep->findQualifier(name);
 } }
  
 CIMQualifier CIMObject::getQualifier(Uint32 pos)  CIMQualifier CIMObject::getQualifier(Uint32 index)
 { {
     _checkRep();     _checkRep();
     return _rep->getQualifier(pos);      return _rep->getQualifier(index);
 } }
  
 CIMConstQualifier CIMObject::getQualifier(Uint32 pos) const  CIMConstQualifier CIMObject::getQualifier(Uint32 index) const
 { {
     _checkRep();     _checkRep();
     return _rep->getQualifier(pos);      return _rep->getQualifier(index);
 } }
  
 void CIMObject::removeQualifier(Uint32 pos)  void CIMObject::removeQualifier(Uint32 index)
 { {
     _checkRep();     _checkRep();
     _rep->removeQualifier(pos);      _rep->removeQualifier(index);
 } }
  
 Uint32 CIMObject::getQualifierCount() const Uint32 CIMObject::getQualifierCount() const
Line 177 
Line 159 
     return _rep->findProperty(name);     return _rep->findProperty(name);
 } }
  
 CIMProperty CIMObject::getProperty(Uint32 pos)  CIMProperty CIMObject::getProperty(Uint32 index)
 { {
     _checkRep();     _checkRep();
     return _rep->getProperty(pos);      return _rep->getProperty(index);
 } }
  
 CIMConstProperty CIMObject::getProperty(Uint32 pos) const  CIMConstProperty CIMObject::getProperty(Uint32 index) const
 { {
     _checkRep();     _checkRep();
     return _rep->getProperty(pos);      return _rep->getProperty(index);
 } }
  
 void CIMObject::removeProperty(Uint32 pos)  void CIMObject::removeProperty(Uint32 index)
 { {
     _checkRep();     _checkRep();
     _rep->removeProperty(pos);      _rep->removeProperty(index);
 } }
  
 Uint32 CIMObject::getPropertyCount() const Uint32 CIMObject::getPropertyCount() const
Line 201 
Line 183 
     return _rep->getPropertyCount();     return _rep->getPropertyCount();
 } }
  
 Boolean CIMObject::isNull() const  Boolean CIMObject::isUninitialized() const
 { {
     return (_rep == 0)? true : false;      return _rep == 0;
   }
   
   String CIMObject::toString() const
   {
       Buffer out;
   
       _checkRep();
       _rep->toXml(out);
   
       return out.getData();
   }
   
   Boolean CIMObject::isClass() const
   {
       try
       {
           const CIMClass c(*this);
           return true;
       }
       catch (DynamicCastFailedException&)
       {
           return false;
       }
   }
   
   Boolean CIMObject::isInstance() const
   {
       try
       {
           const CIMInstance i(*this);
           return true;
       }
       catch (DynamicCastFailedException&)
       {
           return false;
       }
 } }
  
 Boolean CIMObject::identical(const CIMConstObject& x) const Boolean CIMObject::identical(const CIMConstObject& x) const
Line 222 
Line 240 
 void CIMObject::_checkRep() const void CIMObject::_checkRep() const
 { {
     if (!_rep)     if (!_rep)
         ThrowUninitializedHandle();          throw UninitializedObjectException();
 } }
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Line 276 
Line 294 
     return *this;     return *this;
 } }
  
 CIMConstObject& CIMConstObject::operator=(const CIMObject& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMConstObject& CIMConstObject::operator=(const CIMClass& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMConstObject& CIMConstObject::operator=(const CIMInstance& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMConstObject& CIMConstObject::operator=(const CIMConstClass& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMConstObject& CIMConstObject::operator=(const CIMConstInstance& x)  
 {  
     if (x._rep != _rep)  
     {  
         Dec(_rep);  
         Inc(_rep = x._rep);  
     }  
     return *this;  
 }  
   
 CIMConstObject::~CIMConstObject() CIMConstObject::~CIMConstObject()
 { {
     Dec(_rep);     Dec(_rep);
Line 349 
Line 317 
     return _rep->findQualifier(name);     return _rep->findQualifier(name);
 } }
  
 CIMConstQualifier CIMConstObject::getQualifier(Uint32 pos) const  CIMConstQualifier CIMConstObject::getQualifier(Uint32 index) const
 { {
     _checkRep();     _checkRep();
     return _rep->getQualifier(pos);      return _rep->getQualifier(index);
 } }
  
 Uint32 CIMConstObject::getQualifierCount() const Uint32 CIMConstObject::getQualifierCount() const
Line 367 
Line 335 
     return _rep->findProperty(name);     return _rep->findProperty(name);
 } }
  
 CIMConstProperty CIMConstObject::getProperty(Uint32 pos) const  CIMConstProperty CIMConstObject::getProperty(Uint32 index) const
 { {
     _checkRep();     _checkRep();
     return _rep->getProperty(pos);      return _rep->getProperty(index);
 } }
  
 Uint32 CIMConstObject::getPropertyCount() const Uint32 CIMConstObject::getPropertyCount() const
Line 379 
Line 347 
     return _rep->getPropertyCount();     return _rep->getPropertyCount();
 } }
  
 Boolean CIMConstObject::isNull() const  Boolean CIMConstObject::isUninitialized() const
   {
       return _rep == 0;
   }
   
   String CIMConstObject::toString() const
   {
       Buffer out;
   
       _checkRep();
       _rep->toXml(out);
   
       return out.getData();
   }
   
   Boolean CIMConstObject::isClass() const
 { {
     return (_rep == 0)? true : false;      try
       {
           const CIMConstClass c(*this);
           return true;
       }
       catch (DynamicCastFailedException&)
       {
           return false;
       }
   }
   
   Boolean CIMConstObject::isInstance() const
   {
       try
       {
           const CIMConstInstance i(*this);
           return true;
       }
       catch (DynamicCastFailedException&)
       {
           return false;
       }
 } }
  
 Boolean CIMConstObject::identical(const CIMConstObject& x) const Boolean CIMConstObject::identical(const CIMConstObject& x) const
Line 399 
Line 403 
 void CIMConstObject::_checkRep() const void CIMConstObject::_checkRep() const
 { {
     if (!_rep)     if (!_rep)
         ThrowUninitializedHandle();          throw UninitializedObjectException();
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.23  
changed lines
  Added in v.1.40

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2