(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.1 and 1.7

version 1.1, 2001/07/01 22:21:57 version 1.7, 2002/01/08 18:22:45
Line 27 
Line 27 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "CIMObject.h" #include "CIMObject.h"
   #include "CIMClass.h"
   #include "CIMInstance.h"
   #include "XmlWriter.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 CIMClass CIMObject::getClass()  ////////////////////////////////////////////////////////////////////////////////
   //
   // CIMObject
   //
   ////////////////////////////////////////////////////////////////////////////////
   
   CIMObject::CIMObject(const CIMClass& x)
 { {
     CIMClassRep* rep = dynamic_cast<CIMClassRep*>(_rep);      Inc(_rep = x._rep);
   }
  
     if (!rep)  CIMObject::CIMObject(const CIMInstance& x)
         throw TypeMismatch();  {
       Inc(_rep = x._rep);
   }
  
     return CIMClass(rep);  CIMObject& CIMObject::operator=(const CIMClass& x)
   {
       if (x._rep != _rep)
       {
           Dec(_rep);
           Inc(_rep = x._rep);
       }
       return *this;
 } }
  
 CIMInstance CIMObject::getInstance()  CIMObject& CIMObject::operator=(const CIMInstance& x)
 { {
     CIMInstanceRep* rep = dynamic_cast<CIMInstanceRep*>(_rep);      if (x._rep != _rep)
       {
           Dec(_rep);
           Inc(_rep = x._rep);
       }
       return *this;
   }
  
     if (!rep)  Boolean CIMObject::identical(const CIMConstObject& x) const
         throw TypeMismatch();  {
       x._checkRep();
       _checkRep();
       return _rep->identical(x._rep);
   }
  
     return CIMInstance(rep);  ////////////////////////////////////////////////////////////////////////////////
   //
   // CIMConstObject
   //
   ////////////////////////////////////////////////////////////////////////////////
   
   CIMConstObject::CIMConstObject(const CIMClass& x)
   {
       Inc(_rep = x._rep);
 } }
  
   CIMConstObject::CIMConstObject(const CIMConstClass& x)
   {
       Inc(_rep = x._rep);
   }
   
   CIMConstObject::CIMConstObject(const CIMInstance& x)
   {
       Inc(_rep = x._rep);
   }
   
   CIMConstObject::CIMConstObject(const CIMConstInstance& x)
   {
       Inc(_rep = x._rep);
   }
   
   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;
   }
   
   ////////////////////////////////////////////////////////////////////////////////
   //
   // CIMObjectWithPath
   //
   ////////////////////////////////////////////////////////////////////////////////
   
 CIMObjectWithPath::CIMObjectWithPath() CIMObjectWithPath::CIMObjectWithPath()
 { {
  
 } }
  
 CIMObjectWithPath::CIMObjectWithPath( CIMObjectWithPath::CIMObjectWithPath(
     CIMReference& reference,      const CIMReference& reference,
     CIMObject& object)      const CIMObject& object)
     : _reference(reference), _object(object)     : _reference(reference), _object(object)
 { {
  
Line 84 
Line 182 
     return *this;     return *this;
 } }
  
 void CIMObjectWithPath::set(CIMReference& reference, CIMObject& object)  void CIMObjectWithPath::set(
       const CIMReference& reference,
       const CIMObject& object)
 { {
     _reference = reference;     _reference = reference;
     _object = object;     _object = object;
 } }
  
   void CIMObjectWithPath::toXml(Array<Sint8>& out) const
   {
       out << "<VALUE.OBJECTWITHPATH>\n";
   
       _reference.toXml(out, false);
       _object.toXml(out);
   
       out << "</VALUE.OBJECTWITHPATH>\n";
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2