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

Diff for /pegasus/src/Pegasus/Common/CIMObject.h between version 1.2 and 1.3

version 1.2, 2001/07/02 01:50:09 version 1.3, 2001/07/03 14:57:38
Line 45 
Line 45 
 { {
 public: public:
  
     CIMObject() : _rep(0)      CIMObject() : _rep(0), _type(TYPE_NONE)
     {     {
  
     }     }
  
     CIMObject(const CIMObject& x)      CIMObject(const CIMObject& x) : _type(x._type)
     {     {
         Inc(_rep = x._rep);         Inc(_rep = x._rep);
     }     }
  
     CIMObject(const CIMClass& x)      CIMObject(const CIMClass& x) : _type(TYPE_CLASS)
     {     {
         Inc(_rep = x._rep);         Inc(_rep = x._rep);
     }     }
  
     CIMObject(const CIMInstance& x)      CIMObject(const CIMInstance& x) : _type(TYPE_INSTANCE)
     {     {
         Inc(_rep = x._rep);         Inc(_rep = x._rep);
     }     }
Line 71 
Line 71 
         {         {
             Dec(_rep);             Dec(_rep);
             Inc(_rep = x._rep);             Inc(_rep = x._rep);
               _type = x._type;
         }         }
         return *this;         return *this;
     }     }
Line 81 
Line 82 
         {         {
             Dec(_rep);             Dec(_rep);
             Inc(_rep = x._rep);             Inc(_rep = x._rep);
               _type = TYPE_CLASS;
         }         }
         return *this;         return *this;
     }     }
Line 91 
Line 93 
         {         {
             Dec(_rep);             Dec(_rep);
             Inc(_rep = x._rep);             Inc(_rep = x._rep);
               _type = TYPE_INSTANCE;
         }         }
         return *this;         return *this;
     }     }
Line 102 
Line 105 
  
     Boolean isClass() const     Boolean isClass() const
     {     {
         _checkRep();          return _type == TYPE_CLASS;
         return dynamic_cast<CIMClassRep*>(_rep) != 0;  
     }     }
  
     Boolean isInstance() const     Boolean isInstance() const
     {     {
         _checkRep();          return _type == TYPE_INSTANCE;
         return dynamic_cast<CIMInstanceRep*>(_rep) != 0;  
     }     }
  
     /** Returns the class contained by this object (if an class).     /** Returns the class contained by this object (if an class).
Line 150 
Line 151 
     // Point to either a CIMClass or CIMInstance:     // Point to either a CIMClass or CIMInstance:
  
     Sharable* _rep;     Sharable* _rep;
   
       enum Type { TYPE_CLASS, TYPE_INSTANCE, TYPE_NONE };
       Type _type;
 }; };
  
 /** The CIMObjectWithPath encapsulates a CIMReference and CIMObject. /** The CIMObjectWithPath encapsulates a CIMReference and CIMObject.
Line 162 
Line 166 
  
     CIMObjectWithPath();     CIMObjectWithPath();
  
     CIMObjectWithPath(CIMReference& reference, CIMObject& object);      CIMObjectWithPath(const CIMReference& reference, const CIMObject& object);
  
     CIMObjectWithPath(const CIMObjectWithPath& x);     CIMObjectWithPath(const CIMObjectWithPath& x);
  
Line 170 
Line 174 
  
     CIMObjectWithPath& operator=(const CIMObjectWithPath& x);     CIMObjectWithPath& operator=(const CIMObjectWithPath& x);
  
     void set(CIMReference& reference, CIMObject& object);      void set(const CIMReference& reference, const CIMObject& object);
  
     const CIMReference& getReference() const { return _reference; }     const CIMReference& getReference() const { return _reference; }
  


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2