(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.5

version 1.2, 2001/07/02 01:50:09 version 1.5, 2001/07/10 06:43:23
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 160 
Line 164 
 { {
 public: public:
  
       /** Constructor
       */
     CIMObjectWithPath();     CIMObjectWithPath();
  
     CIMObjectWithPath(CIMReference& reference, CIMObject& object);      /** constructor
       */
       CIMObjectWithPath(const CIMReference& reference, const CIMObject& object);
  
       /** Constructor - Constructs a CIMObjectWithPath Object from
           another CimObjectWithPath
           @param - ATTN
       */
     CIMObjectWithPath(const CIMObjectWithPath& x);     CIMObjectWithPath(const CIMObjectWithPath& x);
  
     ~CIMObjectWithPath();     ~CIMObjectWithPath();
  
     CIMObjectWithPath& operator=(const CIMObjectWithPath& x);     CIMObjectWithPath& operator=(const CIMObjectWithPath& x);
  
     void set(CIMReference& reference, CIMObject& object);      /** set -
       */
       void set(const CIMReference& reference, const CIMObject& object);
  
       /**
       */
     const CIMReference& getReference() const { return _reference; }     const CIMReference& getReference() const { return _reference; }
  
       /**
       */
     const CIMObject& getObject() const { return _object; }     const CIMObject& getObject() const { return _object; }
  
       /**
       */
     CIMReference& getReference() { return _reference; }     CIMReference& getReference() { return _reference; }
  
       /**
       */
     CIMObject& getObject() { return _object; }     CIMObject& getObject() { return _object; }
  
       /**
       */
     void toXml(Array<Sint8>& out) const;     void toXml(Array<Sint8>& out) const;
  
 private: private:


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2