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

  1 karl  1.21 //%2003////////////////////////////////////////////////////////////////////////
  2 mike  1.1  //
  3 karl  1.21 // 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            // IBM Corp.; EMC Corporation, The Open Group.
  7 mike  1.1  //
  8            // Permission is hereby granted, free of charge, to any person obtaining a copy
  9 chip  1.2  // of this software and associated documentation files (the "Software"), to
 10            // deal in the Software without restriction, including without limitation the
 11            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12 mike  1.1  // sell copies of the Software, and to permit persons to whom the Software is
 13            // furnished to do so, subject to the following conditions:
 14 kumpf 1.16 // 
 15 chip  1.2  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16 mike  1.1  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18 chip  1.2  // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21 mike  1.1  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23            //
 24            //==============================================================================
 25            //
 26            // Author: Mike Brasher (mbrasher@bmc.com)
 27            //
 28 kumpf 1.15 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 29            //                  (carolann_graves@hp.com)
 30 schuur 1.22 //              Adriann Schuur (schuur@de.ibm.com) PEP 164
 31 mike   1.1  //
 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             class PEGASUS_COMMON_LINKAGE CIMObjectRep : public Sharable
 57             {
 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 chip   1.4  	return _reference.getClassName();
 67                 }
 68             
 69 kumpf  1.12     const CIMObjectPath& getPath() const
 70 chip   1.4      {
 71             	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             	_qualifiers.add(qualifier);
 83                 }
 84             
 85 kumpf  1.19     Uint32 findQualifier(const CIMName& name) const
 86 mike   1.1      {
 87             	return _qualifiers.find(name);
 88                 }
 89             
 90 kumpf  1.20     CIMQualifier getQualifier(Uint32 index)
 91 mike   1.1      {
 92 kumpf  1.20 	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.20 	return _qualifiers.getQualifier(index);
 98 mike   1.1      }
 99             
100 kumpf  1.19     Boolean isTrueQualifer(CIMName& name) const
101 karl   1.5      {
102             	return _qualifiers.isTrue(name);
103                 }
104             
105 mike   1.1      Uint32 getQualifierCount() const
106                 {
107             	return _qualifiers.getCount();
108                 }
109             
110 kumpf  1.20     void removeQualifier(Uint32 index)
111 mike   1.1      {
112 kumpf  1.20 	_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.20 	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                 virtual void toXml(Array<Sint8>& out) const = 0;
133             
134                 virtual CIMObjectRep* clone() const = 0;
135             
136             protected:
137             
138                 CIMObjectRep();
139             
140                 CIMObjectRep(const CIMObjectRep& x);
141             
142 kumpf  1.12     CIMObjectPath _reference;
143 kumpf  1.9      CIMQualifierList _qualifiers;
144                 Array<CIMProperty> _properties;
145                 Boolean _resolved;
146             
147             private:
148             
149                 // This method is declared and made private so that the compiler does
150                 // not implicitly define a default copy constructor.
151 mike   1.1      CIMObjectRep& operator=(const CIMObjectRep& x)
152                 {
153 kumpf  1.14 	//PEGASUS_ASSERT(0);
154 mike   1.1  	return *this;
155                 }
156             
157                 friend class CIMObject;
158 schuur 1.22     friend class BinaryStreamer;
159 mike   1.1  };
160             
161             PEGASUS_NAMESPACE_END
162             
163             #endif /* Pegasus_CIMObjectRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2