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

  1 karl  1.28 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.1  //
  3 karl  1.23 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4            // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5            // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl  1.21 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.23 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.26 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.28 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.1  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 chip  1.2  // of this software and associated documentation files (the "Software"), to
 16            // deal in the Software without restriction, including without limitation the
 17            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18 mike  1.1  // sell copies of the Software, and to permit persons to whom the Software is
 19            // furnished to do so, subject to the following conditions:
 20 kumpf 1.16 // 
 21 chip  1.2  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.1  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24 chip  1.2  // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27 mike  1.1  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29            //
 30            //==============================================================================
 31            //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_CIMObjectRep_h
 35            #define Pegasus_CIMObjectRep_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.19 #include <Pegasus/Common/Linkage.h>
 39 mike  1.1  #include <Pegasus/Common/String.h>
 40 kumpf 1.10 #include <Pegasus/Common/Sharable.h>
 41 kumpf 1.19 #include <Pegasus/Common/CIMName.h>
 42 mike  1.1  #include <Pegasus/Common/CIMProperty.h>
 43            #include <Pegasus/Common/CIMQualifier.h>
 44 kumpf 1.8  #include <Pegasus/Common/CIMQualifierList.h>
 45 mike  1.1  #include <Pegasus/Common/Array.h>
 46            
 47            PEGASUS_NAMESPACE_BEGIN
 48            
 49            /** This class defines the internal representation of the CIMObject class.
 50            
 51                This base class has two implementations: CIMClassRep CIMInstanceRep. The
 52                CIMObjectRep pointer member of CIMObject points to one of these.
 53            
 54                This class contains what is common to CIMClass and CIMInstance.
 55            */
 56 mike  1.29 class CIMObjectRep : public Sharable
 57 mike  1.1  {
 58            public:
 59            
 60 kumpf 1.12     CIMObjectRep(const CIMObjectPath& className);
 61 mike  1.1  
 62                virtual ~CIMObjectRep();
 63            
 64 kumpf 1.19     const CIMName& getClassName() const
 65 chip  1.2      {
 66 kumpf 1.30         return _reference.getClassName();
 67 chip  1.4      }
 68            
 69 kumpf 1.12     const CIMObjectPath& getPath() const
 70 chip  1.4      {
 71 kumpf 1.30         return _reference;
 72 mike  1.1      }
 73 kumpf 1.15 
 74                /**
 75                  Sets the object path for the object
 76                  @param  path  CIMObjectPath containing the object path
 77                 */
 78                void setPath (const CIMObjectPath & path);
 79 mike  1.1  
 80                void addQualifier(const CIMQualifier& qualifier)
 81                {
 82 kumpf 1.30         _qualifiers.add(qualifier);
 83 mike  1.1      }
 84            
 85 kumpf 1.19     Uint32 findQualifier(const CIMName& name) const
 86 mike  1.1      {
 87 kumpf 1.30         return _qualifiers.find(name);
 88 mike  1.1      }
 89            
 90 kumpf 1.20     CIMQualifier getQualifier(Uint32 index)
 91 mike  1.1      {
 92 kumpf 1.30         return _qualifiers.getQualifier(index);
 93 mike  1.1      }
 94            
 95 kumpf 1.20     CIMConstQualifier getQualifier(Uint32 index) const
 96 mike  1.1      {
 97 kumpf 1.30         return _qualifiers.getQualifier(index);
 98 mike  1.1      }
 99            
100 kumpf 1.19     Boolean isTrueQualifer(CIMName& name) const
101 karl  1.5      {
102 kumpf 1.30         return _qualifiers.isTrue(name);
103 karl  1.5      }
104            
105 mike  1.1      Uint32 getQualifierCount() const
106                {
107 kumpf 1.30         return _qualifiers.getCount();
108 mike  1.1      }
109            
110 kumpf 1.20     void removeQualifier(Uint32 index)
111 mike  1.1      {
112 kumpf 1.30         _qualifiers.removeQualifier(index);
113 mike  1.1      }
114            
115                virtual void addProperty(const CIMProperty& x);
116            
117 kumpf 1.19     Uint32 findProperty(const CIMName& name) const;
118 mike  1.1  
119 kumpf 1.20     CIMProperty getProperty(Uint32 index);
120 mike  1.1  
121 kumpf 1.20     CIMConstProperty getProperty(Uint32 index) const
122 mike  1.1      {
123 kumpf 1.30         return ((CIMObjectRep*)this)->getProperty(index);
124 mike  1.1      }
125            
126 kumpf 1.20     void removeProperty(Uint32 index);
127 mike  1.1  
128                Uint32 getPropertyCount() const;
129            
130                virtual Boolean identical(const CIMObjectRep* x) const;
131            
132 mike  1.27     virtual void toXml(Buffer& out) const = 0;
133 mike  1.1  
134 mike  1.27     virtual void toMof(Buffer& out) const = 0;
135 dave.sudlik 1.24 
136 mike        1.1      virtual CIMObjectRep* clone() const = 0;
137                  
138                  protected:
139                  
140                      CIMObjectRep();
141                  
142                      CIMObjectRep(const CIMObjectRep& x);
143                  
144 kumpf       1.12     CIMObjectPath _reference;
145 kumpf       1.9      CIMQualifierList _qualifiers;
146                      Array<CIMProperty> _properties;
147                      Boolean _resolved;
148                  
149                  private:
150                  
151                      // This method is declared and made private so that the compiler does
152                      // not implicitly define a default copy constructor.
153 mike        1.1      CIMObjectRep& operator=(const CIMObjectRep& x)
154                      {
155 kumpf       1.30         //PEGASUS_ASSERT(0);
156                          return *this;
157 mike        1.1      }
158                  
159                      friend class CIMObject;
160 schuur      1.22     friend class BinaryStreamer;
161 mike        1.1  };
162                  
163                  PEGASUS_NAMESPACE_END
164                  
165                  #endif /* Pegasus_CIMObjectRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2