(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.7 and 1.10

version 1.7, 2002/01/08 18:22:45 version 1.10, 2002/05/03 05:16:16
Line 26 
Line 26 
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
   #include "CIMClassRep.h"
   #include "CIMInstanceRep.h"
   #include "CIMObjectRep.h"
 #include "CIMObject.h" #include "CIMObject.h"
 #include "CIMClass.h" #include "CIMClass.h"
 #include "CIMInstance.h" #include "CIMInstance.h"
Line 39 
Line 42 
 // //
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
   CIMObject::CIMObject()
       : _rep(0)
   {
   }
   
   CIMObject::CIMObject(const CIMObject& x)
   {
       Inc(_rep = x._rep);
   }
   
 CIMObject::CIMObject(const CIMClass& x) CIMObject::CIMObject(const CIMClass& x)
 { {
     Inc(_rep = x._rep);     Inc(_rep = x._rep);
Line 49 
Line 62 
     Inc(_rep = x._rep);     Inc(_rep = x._rep);
 } }
  
   CIMObject::CIMObject(CIMObjectRep* rep)
       : _rep(rep)
   {
   }
   
   CIMObject& CIMObject::operator=(const CIMObject& x)
   {
       if (x._rep != _rep)
       {
           Dec(_rep);
           Inc(_rep = x._rep);
       }
       return *this;
   }
   
 CIMObject& CIMObject::operator=(const CIMClass& x) CIMObject& CIMObject::operator=(const CIMClass& x)
 { {
     if (x._rep != _rep)     if (x._rep != _rep)
Line 69 
Line 97 
     return *this;     return *this;
 } }
  
   CIMObject::~CIMObject()
   {
       Dec(_rep);
   }
   
   const String& CIMObject::getClassName() const
   {
       _checkRep();
       return _rep->getClassName();
   }
   
   const Boolean CIMObject::equalClassName(const String& classname) const
   {
       _checkRep();
       return _rep->equalClassName(classname);
   }
   
   const CIMReference& CIMObject::getPath() const
   {
       _checkRep();
       return _rep->getPath();
   }
   
   CIMObject& CIMObject::addQualifier(const CIMQualifier& qualifier)
   {
       _checkRep();
       _rep->addQualifier(qualifier);
       return *this;
   }
   
   Uint32 CIMObject::findQualifier(const String& name) const
   {
       _checkRep();
       return _rep->findQualifier(name);
   }
   
   Boolean CIMObject::existsQualifier(const String& name) const
   {
       _checkRep();
       return _rep->existsQualifier(name);
   }
   
   CIMQualifier CIMObject::getQualifier(Uint32 pos)
   {
       _checkRep();
       return _rep->getQualifier(pos);
   }
   
   CIMConstQualifier CIMObject::getQualifier(Uint32 pos) const
   {
       _checkRep();
       return _rep->getQualifier(pos);
   }
   
   void CIMObject::removeQualifier(Uint32 pos)
   {
       _checkRep();
       _rep->removeQualifier(pos);
   }
   
   Uint32 CIMObject::getQualifierCount() const
   {
       _checkRep();
       return _rep->getQualifierCount();
   }
   
   CIMObject& CIMObject::addProperty(const CIMProperty& x)
   {
       _checkRep();
       _rep->addProperty(x);
       return *this;
   }
   
   Uint32 CIMObject::findProperty(const String& name) const
   {
       _checkRep();
       return _rep->findProperty(name);
   }
   
   Boolean CIMObject::existsProperty(const String& name) const
   {
       _checkRep();
       return _rep->existsProperty(name);
   }
   
   CIMProperty CIMObject::getProperty(Uint32 pos)
   {
       _checkRep();
       return _rep->getProperty(pos);
   }
   
   CIMConstProperty CIMObject::getProperty(Uint32 pos) const
   {
       _checkRep();
       return _rep->getProperty(pos);
   }
   
   void CIMObject::removeProperty(Uint32 pos)
   {
       _checkRep();
       _rep->removeProperty(pos);
   }
   
   Uint32 CIMObject::getPropertyCount() const
   {
       _checkRep();
       return _rep->getPropertyCount();
   }
   
   CIMObject::operator int() const
   {
       return (_rep != 0);
   }
   
 Boolean CIMObject::identical(const CIMConstObject& x) const Boolean CIMObject::identical(const CIMConstObject& x) const
 { {
     x._checkRep();     x._checkRep();
Line 76 
Line 218 
     return _rep->identical(x._rep);     return _rep->identical(x._rep);
 } }
  
   void CIMObject::toXml(Array<Sint8>& out) const
   {
       _checkRep();
       _rep->toXml(out);
   }
   
   CIMObject CIMObject::clone() const
   {
       _checkRep();
       return CIMObject(_rep->clone());
   }
   
   void CIMObject::_checkRep() const
   {
       if (!_rep)
           ThrowUnitializedHandle();
   }
   
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
 // CIMConstObject // CIMConstObject
 // //
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
   CIMConstObject::CIMConstObject()
       : _rep(0)
   {
   }
   
   CIMConstObject::CIMConstObject(const CIMConstObject& x)
   {
       Inc(_rep = x._rep);
   }
   
   CIMConstObject::CIMConstObject(const CIMObject& x)
   {
       Inc(_rep = x._rep);
   }
   
 CIMConstObject::CIMConstObject(const CIMClass& x) CIMConstObject::CIMConstObject(const CIMClass& x)
 { {
     Inc(_rep = x._rep);     Inc(_rep = x._rep);
Line 102 
Line 277 
     Inc(_rep = x._rep);     Inc(_rep = x._rep);
 } }
  
   CIMConstObject& CIMConstObject::operator=(const CIMConstObject& x)
   {
       if (x._rep != _rep)
       {
           Dec(_rep);
           Inc(_rep = x._rep);
       }
       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) CIMConstObject& CIMConstObject::operator=(const CIMClass& x)
 { {
     if (x._rep != _rep)     if (x._rep != _rep)
Line 142 
Line 337 
     return *this;     return *this;
 } }
  
   CIMConstObject::~CIMConstObject()
   {
       Dec(_rep);
   }
   
   const String& CIMConstObject::getClassName() const
   {
       _checkRep();
       return _rep->getClassName();
   }
   
   const CIMReference& CIMConstObject::getPath() const
   {
       _checkRep();
       return _rep->getPath();
   }
   
   Uint32 CIMConstObject::findQualifier(const String& name) const
   {
       _checkRep();
       return _rep->findQualifier(name);
   }
   
   CIMConstQualifier CIMConstObject::getQualifier(Uint32 pos) const
   {
       _checkRep();
       return _rep->getQualifier(pos);
   }
   
   Uint32 CIMConstObject::getQualifierCount() const
   {
       _checkRep();
       return _rep->getQualifierCount();
   }
   
   Uint32 CIMConstObject::findProperty(const String& name) const
   {
       _checkRep();
       return _rep->findProperty(name);
   }
   
   CIMConstProperty CIMConstObject::getProperty(Uint32 pos) const
   {
       _checkRep();
       return _rep->getProperty(pos);
   }
   
   Uint32 CIMConstObject::getPropertyCount() const
   {
       _checkRep();
       return _rep->getPropertyCount();
   }
   
   CIMConstObject::operator int() const
   {
       return (_rep != 0);
   }
   
   void CIMConstObject::toXml(Array<Sint8>& out) const
   {
       _checkRep();
       _rep->toXml(out);
   }
   
   void CIMConstObject::print(PEGASUS_STD(ostream)& o) const
   {
       _checkRep();
       _rep->print(o);
   }
   
   Boolean CIMConstObject::identical(const CIMConstObject& x) const
   {
       x._checkRep();
       _checkRep();
       return _rep->identical(x._rep);
   }
   
   CIMObject CIMConstObject::clone() const
   {
       return CIMObject(_rep->clone());
   }
   
   void CIMConstObject::_checkRep() const
   {
       if (!_rep)
           ThrowUnitializedHandle();
   }
   
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
 // CIMObjectWithPath // CIMObjectWithPath
Line 150 
Line 433 
  
 CIMObjectWithPath::CIMObjectWithPath() CIMObjectWithPath::CIMObjectWithPath()
 { {
   
 } }
  
 CIMObjectWithPath::CIMObjectWithPath( CIMObjectWithPath::CIMObjectWithPath(
Line 158 
Line 440 
     const CIMObject& object)     const CIMObject& object)
     : _reference(reference), _object(object)     : _reference(reference), _object(object)
 { {
   
 } }
  
 CIMObjectWithPath::CIMObjectWithPath(const CIMObjectWithPath& x) CIMObjectWithPath::CIMObjectWithPath(const CIMObjectWithPath& x)
     : _reference(x._reference), _object(x._object)     : _reference(x._reference), _object(x._object)
 { {
   
 } }
  
 CIMObjectWithPath::~CIMObjectWithPath() CIMObjectWithPath::~CIMObjectWithPath()
 { {
   
 } }
  
 CIMObjectWithPath& CIMObjectWithPath::operator=(const CIMObjectWithPath& x) CIMObjectWithPath& CIMObjectWithPath::operator=(const CIMObjectWithPath& x)
Line 190 
Line 469 
     _object = object;     _object = object;
 } }
  
   const CIMReference& CIMObjectWithPath::getReference() const
   {
       return _reference;
   }
   
   const CIMObject& CIMObjectWithPath::getObject() const
   {
       return _object;
   }
   
   CIMReference& CIMObjectWithPath::getReference()
   {
       return _reference;
   }
   
   CIMObject& CIMObjectWithPath::getObject()
   {
       return _object;
   }
   
 void CIMObjectWithPath::toXml(Array<Sint8>& out) const void CIMObjectWithPath::toXml(Array<Sint8>& out) const
 { {
     out << "<VALUE.OBJECTWITHPATH>\n";     out << "<VALUE.OBJECTWITHPATH>\n";


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.10

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2