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

  1 karl  1.72 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.25 //
  3 karl  1.70 // 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.63 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.70 // 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.71 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.72 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.25 //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 chip  1.29 // 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.25 // 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.48 // 
 21 chip  1.29 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.25 // 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.29 // 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.25 // 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_CIMClass_h
 35            #define Pegasus_CIMClass_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.53 #include <Pegasus/Common/Linkage.h>
 39            #include <Pegasus/Common/CIMName.h>
 40 mike  1.27 #include <Pegasus/Common/CIMObject.h>
 41 kumpf 1.37 #include <Pegasus/Common/CIMMethod.h>
 42 karl  1.66 #include <Pegasus/Common/CIMInstance.h>
 43 karl  1.65 #include <Pegasus/Common/CIMPropertyList.h>
 44 mike  1.25 
 45            PEGASUS_NAMESPACE_BEGIN
 46            
 47            class CIMConstClass;
 48 kumpf 1.37 class CIMClassRep;
 49 kumpf 1.51 class Resolver;
 50 mike  1.25 
 51 mike  1.28 
 52 kumpf 1.73 /**
 53                The CIMClass class represents the DMTF standard CIM class definition.
 54            
 55                <p>The CIMClass class uses a shared representation model, such that
 56                multiple CIMClass objects may refer to the same data copy.  Assignment
 57                and copy operators create new references to the same data, not distinct
 58                copies.  An update to a CIMClass object affects all the CIMClass
 59                objects that refer to the same data copy.  The data remains valid until
 60                all the CIMClass objects that refer to it are destructed.  A separate
 61                copy of the data may be created using the clone method.
 62 mike  1.25 */
 63            class PEGASUS_COMMON_LINKAGE CIMClass
 64            {
 65            public:
 66            
 67 kumpf 1.73     /**
 68                    Constructs an uninitialized CIMClass object.  A method
 69                    invocation on an uninitialized object will result in the throwing
 70                    of an UninitializedObjectException.  An uninitialized object may
 71                    be converted into an initialized object only by using the assignment
 72                    operator with an initialized object.
 73 mike  1.25     */
 74 kumpf 1.37     CIMClass();
 75 mike  1.25 
 76 kumpf 1.73     /**
 77                    Constructs a CIMClass object from the value of a specified
 78                    CIMClass object, so that both objects refer to the same data copy.
 79                    @param x The CIMClass object from which to construct a new
 80                        CIMClass object.
 81 mike  1.25     */
 82 kumpf 1.37     CIMClass(const CIMClass& x);
 83 mike  1.25 
 84 kumpf 1.73     /**
 85                    Constructs a CIMClass object from the value of a specified
 86                    CIMObject object, so that both objects refer to the same data copy.
 87                    @param x The CIMObject object from which to construct the
 88                        CIMClass object.
 89                    @exception DynamicCastFailedException If a CIMClass can not be
 90                        created from the given CIMObject.
 91 kumpf 1.61     */
 92                PEGASUS_EXPLICIT CIMClass(const CIMObject& x);
 93 mike  1.27 
 94 kumpf 1.73     /**
 95                    Constructs a CIMClass object with the specified attributes.
 96                    <p><b>Example:</b>
 97                    <pre>
 98                        CIMClass NewClass("MyClass", "YourClass");
 99                    </pre>
100            
101                    @param className A CIMName specifying the name of the class.
102                    @param superClassName A CIMName specifying name of the parent class.
103                        (A null value indicates no superclass.)
104 mike  1.25     */
105                CIMClass(
106 kumpf 1.73         const CIMName& className,
107                    const CIMName& superClassName = CIMName());
108 kumpf 1.37 
109 kumpf 1.73     /**
110                    Assigns the value of the specified CIMClass object to this object,
111                    so that both objects refer to the same data copy.
112                    @param x The CIMClass object from which to assign this CIMClass
113                        object.
114                    @return A reference to this CIMClass object.
115                */
116 kumpf 1.37     CIMClass& operator=(const CIMClass& x);
117 mike  1.25 
118 kumpf 1.73     /**
119                    Destructs the CIMClass object.
120                */
121 kumpf 1.37     ~CIMClass();
122 mike  1.25 
123 kumpf 1.73     /**
124                    Indicates whether this class is an association class.  An 
125 kumpf 1.62         association is a relationship between two (or more) classes or 
126 kumpf 1.73         instances.  The Association qualifier is used to make this
127                    determination.
128                    @return True if this class is an association class, false otherwise.
129                    @exception UninitializedObjectException If the object is not
130                        initialized.
131 mike  1.25     */
132 kumpf 1.37     Boolean isAssociation() const;
133 mike  1.25 
134 kumpf 1.73     /**
135                    Indicates whether this class is an abstract class.
136                    The Abstract qualifier is used to make this determination.
137                    @return True if this class is an abstract class, false otherwise.
138                    @exception UninitializedObjectException If the object is not
139                        initialized.
140 mike  1.26     */
141 kumpf 1.37     Boolean isAbstract() const;
142 mike  1.25 
143 kumpf 1.73     /**
144                    Gets the name of the class.
145                    @return A CIMName containing the class name.
146                    @exception UninitializedObjectException If the object is not
147                        initialized.
148 mike  1.25     */
149 kumpf 1.53     const CIMName& getClassName() const;
150 karl  1.32         
151 kumpf 1.73     /**
152                    Gets the object path for the class.
153                    @return A CIMObjectPath containing the object path.
154                    @exception UninitializedObjectException If the object is not
155                        initialized.
156                */
157 kumpf 1.44     const CIMObjectPath& getPath() const;
158 kumpf 1.46 
159 kumpf 1.73     /**
160                    Sets the object path for the class.
161                    @param path A CIMObjectPath containing the object path.
162                    @exception UninitializedObjectException If the object is not
163                        initialized.
164 kumpf 1.62     */
165 kumpf 1.46     void setPath (const CIMObjectPath & path);
166 chip  1.29 
167 kumpf 1.73     /**
168                    Gets the name of the parent class of this class.
169                    @return A CIMName containing parent class name.
170                    @exception UninitializedObjectException If the object is not
171                        initialized.
172 mike  1.25     */
173 kumpf 1.53     const CIMName& getSuperClassName() const;
174 mike  1.25 
175 kumpf 1.73     /**
176                    Sets the name of the parent class.
177                    @param superClassName A CIMName specifying the parent class name.
178                    @exception UninitializedObjectException If the object is not
179                        initialized.
180 mike  1.25     */
181 kumpf 1.53     void setSuperClassName(const CIMName& superClassName);
182 mike  1.25 
183 kumpf 1.73     /**
184                    Adds a qualifier to the class.
185                    @param qualifier The CIMQualifier to be added.
186                    @return A reference to this CIMClass object.
187                    @exception AlreadyExistsException If a qualifier with the
188                        same name already exists in the CIMClass.
189                    @exception UninitializedObjectException If the object is not
190                        initialized.
191 mike  1.25     */
192 kumpf 1.37     CIMClass& addQualifier(const CIMQualifier& qualifier);
193 mike  1.25 
194 kumpf 1.73     /**
195                    Finds a qualifier by name.
196                    @param name A CIMName specifying the name of the qualifier to be found.
197                    @return Index of the qualifier if found or PEG_NOT_FOUND if not found.
198                    @exception UninitializedObjectException If the object is not
199                        initialized.
200 mike  1.25     */
201 kumpf 1.53     Uint32 findQualifier(const CIMName& name) const;
202 kumpf 1.37 
203 kumpf 1.73     /**
204                    Gets the qualifier at the specified index.
205                    @param index The index of the qualifier to be retrieved.
206                    @return The CIMQualifier at the specified index.
207                    @exception IndexOutOfBoundsException If the index is outside
208                        the range of qualifiers available for the CIMClass.
209                    @exception UninitializedObjectException If the object is not
210                        initialized.
211 mike  1.25     */
212 kumpf 1.60     CIMQualifier getQualifier(Uint32 index);
213 mike  1.25 
214 kumpf 1.73     /**
215                    Gets the qualifier at the specified index.
216                    @param index The index of the qualifier to be retrieved.
217                    @return The CIMConstQualifier at the specified index.
218                    @exception IndexOutOfBoundsException If the index is outside
219                        the range of qualifiers available for the CIMClass.
220                    @exception UninitializedObjectException If the object is not
221                        initialized.
222 kumpf 1.57     */
223 kumpf 1.60     CIMConstQualifier getQualifier(Uint32 index) const;
224 mike  1.25 
225 kumpf 1.73     /**
226                    Removes a qualifier from the class.
227                    @param index The index of the qualifier to remove.
228                    @exception IndexOutOfBoundsException If the index is
229                        outside the range of qualifiers available for the CIMClass.
230                    @exception UninitializedObjectException If the object is not
231                        initialized.
232 mike  1.25     */
233 kumpf 1.60     void removeQualifier(Uint32 index);
234 mike  1.25 
235 kumpf 1.73     /**
236                    Gets the number of qualifiers in the class.
237                    @return An integer count of the qualifiers in the CIMClass.
238                    @exception UninitializedObjectException If the object is not
239                        initialized.
240 mike  1.25     */
241 kumpf 1.37     Uint32 getQualifierCount() const;
242 mike  1.25 
243 kumpf 1.73     /**
244                    Adds a property to the class.
245                    @param x The CIMProperty to be added.
246                    @return A reference to this CIMClass object.
247                    @exception AlreadyExistsException If a property with the
248                        same name already exists in the CIMClass.
249                    @exception UninitializedObjectException If the object is not
250                        initialized.
251 mike  1.25     */
252 kumpf 1.37     CIMClass& addProperty(const CIMProperty& x);
253 mike  1.25 
254 kumpf 1.73     /**
255                    Finds a property by name.
256                    @param name A CIMName specifying the name of the property to be found.
257                    @return Index of the property if found or PEG_NOT_FOUND if not found.
258                    @exception UninitializedObjectException If the object is not
259                        initialized.
260 mike  1.25     */
261 kumpf 1.53     Uint32 findProperty(const CIMName& name) const;
262 mike  1.25 
263 kumpf 1.73     /**
264                    Gets the property at the specified index.
265                    @param index The index of the property to be retrieved.
266                    @return The CIMProperty at the specified index.
267                    @exception IndexOutOfBoundsException If the index is outside
268                        the range of properties available for the CIMClass.
269                    @exception UninitializedObjectException If the object is not
270                        initialized.
271 mike  1.25     */
272 kumpf 1.60     CIMProperty getProperty(Uint32 index);
273 mike  1.25 
274 kumpf 1.73     /**
275                    Gets the property at the specified index.
276                    @param index The index of the property to be retrieved.
277                    @return The CIMConstProperty at the specified index.
278                    @exception IndexOutOfBoundsException If the index is outside
279                        the range of properties available for the CIMClass.
280                    @exception UninitializedObjectException If the object is not
281                        initialized.
282 mike  1.25     */
283 kumpf 1.60     CIMConstProperty getProperty(Uint32 index) const;
284 mike  1.25 
285 kumpf 1.73     /**
286                    Removes a property from the class.
287                    @param index The index of the property to remove.
288                    @exception IndexOutOfBoundsException If the index is
289                        outside the range of properties available for the CIMClass.
290                    @exception UninitializedObjectException If the object is not
291                        initialized.
292 mike  1.25     */
293 kumpf 1.60     void removeProperty(Uint32 index);
294 mike  1.25 
295 kumpf 1.73     /**
296                    Gets the number of properties in the class.
297                    @return An integer count of the properties in the CIMClass.
298                    @exception UninitializedObjectException If the object is not
299                        initialized.
300 mike  1.25     */
301 kumpf 1.37     Uint32 getPropertyCount() const;
302 mike  1.25 
303 kumpf 1.73     /**
304                    Adds a method to the class.
305                    @param x The CIMMethod to be added.
306                    @return A reference to this CIMClass object.
307                    @exception AlreadyExistsException If a method with the
308                        same name already exists in the CIMClass.
309                    @exception UninitializedObjectException If the object is not
310                        initialized.
311 mike  1.25     */
312 kumpf 1.37     CIMClass& addMethod(const CIMMethod& x);
313 mike  1.25 
314 kumpf 1.73     /**
315                    Finds a method by name.
316                    @param name A CIMName specifying the name of the method to be found.
317                    @return Index of the method if found or PEG_NOT_FOUND if not found.
318                    @exception UninitializedObjectException If the object is not
319                        initialized.
320 mike  1.25     */
321 kumpf 1.53     Uint32 findMethod(const CIMName& name) const;
322 mike  1.25 
323 kumpf 1.73     /**
324                    Gets the method at the specified index.
325                    @param index The index of the method to be retrieved.
326                    @return The CIMMethod at the specified index.
327                    @exception IndexOutOfBoundsException If the index is outside
328                        the range of methods available for the CIMClass.
329                    @exception UninitializedObjectException If the object is not
330                        initialized.
331 mike  1.25     */
332 kumpf 1.60     CIMMethod getMethod(Uint32 index);
333 mike  1.25 
334 kumpf 1.73     /**
335                    Gets the method at the specified index.
336                    @param index The index of the method to be retrieved.
337                    @return The CIMConstMethod at the specified index.
338                    @exception IndexOutOfBoundsException If the index is outside
339                        the range of methods available for the CIMClass.
340                    @exception UninitializedObjectException If the object is not
341                        initialized.
342 mike  1.25     */
343 kumpf 1.60     CIMConstMethod getMethod(Uint32 index) const;
344 mike  1.25 
345 kumpf 1.73     /**
346                    Removes a method from the class.
347                    @param index The index of the method to remove.
348                    @exception IndexOutOfBoundsException If the index is
349                        outside the range of methods available for the CIMClass.
350                    @exception UninitializedObjectException If the object is not
351                        initialized.
352 mike  1.25     */
353 kumpf 1.60     void removeMethod(Uint32 index);
354 mike  1.25 
355 kumpf 1.73     /**
356                    Gets the number of methods in the class.
357                    @return An integer count of the methods in the CIMClass.
358                    @exception UninitializedObjectException If the object is not
359                        initialized.
360 mike  1.25     */
361 kumpf 1.37     Uint32 getMethodCount() const;
362            
363 kumpf 1.73     /**
364                    Gets the list of key properties in this class.  The Key qualifier
365                    on CIMProperty objects is used to locate key properties.
366                    @return An Array of CIMName objects containing the names of the key
367                    properties.
368                    @exception UninitializedObjectException If the object is not
369                        initialized.
370                */
371 kumpf 1.53     void getKeyNames(Array<CIMName>& keyNames) const;
372 kumpf 1.37 
373 kumpf 1.73     /**
374                    Indicates whether this class contains key properties.  The Key
375                    qualifier on CIMProperty objects is used to make this determination.
376                    @return True if this class contains key properties, false otherwise.
377                    @exception UninitializedObjectException If the object is not
378                        initialized.
379 kumpf 1.62     */
380 kumpf 1.37     Boolean hasKeys() const;
381 mike  1.25 
382 kumpf 1.73     /**
383                    Makes a deep copy of the class.  This creates a new copy of all
384                    the class attributes including qualifiers, properties, and methods.
385                    @return A new copy of the CIMClass object.
386                    @exception UninitializedObjectException If the object is not
387                        initialized.
388 kumpf 1.62     */
389 kumpf 1.37     CIMClass clone() const;
390            
391 kumpf 1.73     /**
392                    Compares the CIMClass with a specified CIMConstClass.
393                    @param x The CIMConstClass to be compared.
394                    @return True if this class is identical to the one specified,
395                        false otherwise.
396                    @exception UninitializedObjectException If the object is not
397                        initialized.
398 mike  1.25     */
399 kumpf 1.37     Boolean identical(const CIMConstClass& x) const;
400 mike  1.25 
401 kumpf 1.73     /**
402                    Determines whether the object has been initialized.
403                    @return True if the object has not been initialized, false otherwise.
404 kumpf 1.62     */
405 kumpf 1.56     Boolean isUninitialized() const;
406 mike  1.25 
407 karl  1.69 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
408 kumpf 1.73     /**
409                    <I><B>Experimental Interface</B></I><BR>
410                    Builds a CIMInstance based on this CIMClass.  Properties in the
411                    instance are initialized to the default values (if any) specified
412                    in the class definition.  The method arguments determine whether
413                    qualifiers are included, the class origin attributes are included,
414                    and which properties are included in the new instance.  This method
415                    is designed specifically for providers to allow them to easily build 
416                    instance objects using the parameters provided with the CIM instance
417                    operations such as getInstance and enumerateInstances.  
418            
419                    <p><b>Example:</b>
420                    <pre>
421                        CIMClass myClass .. a defined and complete CIMClass.
422                        // create instance with qualifiers, class origin and all properties
423                        CIMInstance myInstance =
424                            myClass.buildInstance(true, true, CIMPropertyList());
425                    </pre>
426 karl  1.65     
427 kumpf 1.73         @param includeQualifiers A Boolean indicating whether qualifiers in
428                    the class definition (and its properties) are to be added to the
429                    instance.  If false, no qualifiers are added to the instance or its
430                    properties.  The TOINSTANCE flavor is ignored.  Because the CIM
431                    specification is unclear on the meaning of this parameter and its
432                    relationship to instance operations, the behavior when this parameter
433                    is true MAY change in the future based on clarifications of the
434                    CIM specification.
435            
436                    @param includeClassOrigin A Boolean indicating whether ClassOrigin
437                    attributes are to be transferred from the class object to the
438                    instance.
439            
440                    @param propertyList A CIMPropertyList defining the properties that
441                    are to be added to the created instance.  If the propertyList is not
442                    NULL, properties defined in the class and in this propertyList are
443                    added to the new instance.  If the propertyList is NULL, all
444                    properties are added to the instance.  If the propertyList is empty,
445                    no properties are added.  Note that this function does NOT generate
446                    an error if a property name is supplied that is NOT in the class;
447                    it simply does not add that property to the instance.  
448 karl  1.65     
449 kumpf 1.73         @return CIMInstance of this class appropriately initialized.
450            
451                    @exception UninitializedObjectException If the object is not
452                        initialized.
453 karl  1.65     */
454 karl  1.67     CIMInstance buildInstance(Boolean includeQualifiers,
455 karl  1.65         Boolean includeClassOrigin,
456                    const CIMPropertyList & propertyList) const;
457 karl  1.69 #endif
458 karl  1.65 
459 mike  1.25 private:
460            
461 kumpf 1.37     CIMClassRep* _rep;
462            
463                CIMClass(CIMClassRep* rep);
464            
465                void _checkRep() const;
466 mike  1.25 
467                friend class CIMConstClass;
468                friend class CIMObject;
469 mike  1.27     friend class CIMConstObject;
470 kumpf 1.51     friend class Resolver;
471 kumpf 1.42     friend class XmlWriter;
472 kumpf 1.43     friend class MofWriter;
473 schuur 1.64     friend class BinaryStreamer;
474 mike   1.25 };
475             
476             #define PEGASUS_ARRAY_T CIMClass
477 kumpf  1.47 #include <Pegasus/Common/ArrayInter.h>
478 mike   1.25 #undef PEGASUS_ARRAY_T
479             
480 kumpf  1.73 
481             /**
482                 The CIMConstClass class provides a const interface to a CIMClass
483                 object.  This class is needed because the shared representation model
484                 used by CIMClass does not prevent modification to a const CIMClass
485                 object.  Note that the value of a CIMConstClass object could still be
486                 modified by a CIMClass object that refers to the same data copy.
487             */
488 mike   1.25 class PEGASUS_COMMON_LINKAGE CIMConstClass
489             {
490             public:
491             
492 kumpf  1.73     /**
493                     Constructs an uninitialized CIMConstClass object.  A method
494                     invocation on an uninitialized object will result in the throwing
495                     of an UninitializedObjectException.  An uninitialized object may
496                     be converted into an initialized object only by using the assignment
497                     operator with an initialized object.
498                 */
499 kumpf  1.37     CIMConstClass();
500             
501 kumpf  1.73     /**
502                     Constructs a CIMConstClass object from the value of a specified
503                     CIMConstClass object, so that both objects refer to the same data copy.
504                     @param x The CIMConstClass object from which to construct a new
505                         CIMConstClass object.
506                 */
507 kumpf  1.37     CIMConstClass(const CIMConstClass& x);
508             
509 kumpf  1.73     /**
510                     Constructs a CIMConstClass object from the value of a specified
511                     CIMClass object, so that both objects refer to the same data copy.
512                     @param x The CIMClass object from which to construct a new
513                         CIMConstClass object.
514                 */
515 kumpf  1.37     CIMConstClass(const CIMClass& x);
516 mike   1.25 
517 kumpf  1.73     /**
518                     Constructs a CIMConstClass object from the value of a specified
519                     CIMObject object, so that both objects refer to the same data copy.
520                     @param x The CIMObject object from which to construct the
521                         CIMConstClass object.
522                     @exception DynamicCastFailedException If a CIMConstClass can not be
523                         created from the given CIMObject.
524                 */
525 kumpf  1.61     PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x);
526 mike   1.27 
527 kumpf  1.73     /**
528                     Constructs a CIMConstClass object from the value of a specified
529                     CIMConstObject object, so that both objects refer to the same data
530                     copy.
531                     @param x The CIMConstObject object from which to construct the
532                         CIMConstClass object.
533                     @exception DynamicCastFailedException If a CIMConstClass can not be
534                         created from the given CIMConstObject.
535                 */
536 kumpf  1.61     PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x);
537 mike   1.27 
538 kumpf  1.73     /**
539                     Constructs a CIMConstClass object with the specified attributes.
540                     @param className A CIMName specifying the name of the class.
541                     @param superClassName A CIMName specifying name of the parent class.
542                         (A null value indicates no superclass.)
543                 */
544 mike   1.25     CIMConstClass(
545 kumpf  1.73         const CIMName& className,
546                     const CIMName& superClassName = CIMName());
547 kumpf  1.37 
548 kumpf  1.73     /**
549                     Assigns the value of the specified CIMConstClass object to this
550                     object, so that both objects refer to the same data copy.
551                     @param x The CIMConstClass object from which to assign this
552                         CIMConstClass object.
553                     @return A reference to this CIMConstClass object.
554                 */
555 kumpf  1.37     CIMConstClass& operator=(const CIMConstClass& x);
556             
557 kumpf  1.73     /**
558                     Assigns the value of the specified CIMClass object to this
559                     object, so that both objects refer to the same data copy.
560                     @param x The CIMClass object from which to assign this
561                         CIMConstClass object.
562                     @return A reference to this CIMConstClass object.
563                 */
564 kumpf  1.37     CIMConstClass& operator=(const CIMClass& x);
565             
566 kumpf  1.73     /**
567                     Destructs the CIMConstClass object.
568                 */
569 kumpf  1.37     ~CIMConstClass();
570             
571 kumpf  1.73     /**
572                     Indicates whether this class is an association class.  An 
573                     association is a relationship between two (or more) classes or 
574                     instances.  The Association qualifier is used to make this
575                     determination.
576                     @return True if this class is an association class, false otherwise.
577                     @exception UninitializedObjectException If the object is not
578                         initialized.
579                 */
580 kumpf  1.37     Boolean isAssociation() const;
581             
582 kumpf  1.73     /**
583                     Indicates whether this class is an abstract class.
584                     The Abstract qualifier is used to make this determination.
585                     @return True if this class is an abstract class, false otherwise.
586                     @exception UninitializedObjectException If the object is not
587                         initialized.
588                 */
589 kumpf  1.37     Boolean isAbstract() const;
590             
591 kumpf  1.73     /**
592                     Gets the name of the class.
593                     @return A CIMName containing the class name.
594                     @exception UninitializedObjectException If the object is not
595                         initialized.
596                 */
597 kumpf  1.53     const CIMName& getClassName() const;
598 kumpf  1.37 
599 kumpf  1.73     /**
600                     Gets the object path for the class.
601                     @return A CIMObjectPath containing the object path.
602                     @exception UninitializedObjectException If the object is not
603                         initialized.
604                 */
605 kumpf  1.44     const CIMObjectPath& getPath() const;
606 kumpf  1.37 
607 kumpf  1.73     /**
608                     Gets the name of the parent class of this class.
609                     @return A CIMName containing parent class name.
610                     @exception UninitializedObjectException If the object is not
611                         initialized.
612                 */
613 kumpf  1.53     const CIMName& getSuperClassName() const;
614 kumpf  1.37 
615 kumpf  1.73     /**
616                     Finds a qualifier by name.
617                     @param name A CIMName specifying the name of the qualifier to be found.
618                     @return Index of the qualifier if found or PEG_NOT_FOUND if not found.
619                     @exception UninitializedObjectException If the object is not
620                         initialized.
621                 */
622 kumpf  1.53     Uint32 findQualifier(const CIMName& name) const;
623 kumpf  1.37 
624 kumpf  1.73     /**
625                     Gets the qualifier at the specified index.
626                     @param index The index of the qualifier to be retrieved.
627                     @return The CIMConstQualifier at the specified index.
628                     @exception IndexOutOfBoundsException If the index is outside
629                         the range of qualifiers available for the CIMConstClass.
630                     @exception UninitializedObjectException If the object is not
631                         initialized.
632                 */
633 kumpf  1.60     CIMConstQualifier getQualifier(Uint32 index) const;
634 kumpf  1.37 
635 kumpf  1.73     /**
636                     Gets the number of qualifiers in the class.
637                     @return An integer count of the qualifiers in the CIMConstClass.
638                     @exception UninitializedObjectException If the object is not
639                         initialized.
640                 */
641 kumpf  1.37     Uint32 getQualifierCount() const;
642             
643 kumpf  1.73     /**
644                     Finds a property by name.
645                     @param name A CIMName specifying the name of the property to be found.
646                     @return Index of the property if found or PEG_NOT_FOUND if not found.
647                     @exception UninitializedObjectException If the object is not
648                         initialized.
649                 */
650 kumpf  1.53     Uint32 findProperty(const CIMName& name) const;
651 kumpf  1.37 
652 kumpf  1.73     /**
653                     Gets the property at the specified index.
654                     @param index The index of the property to be retrieved.
655                     @return The CIMConstProperty at the specified index.
656                     @exception IndexOutOfBoundsException If the index is outside
657                         the range of properties available for the CIMConstClass.
658                     @exception UninitializedObjectException If the object is not
659                         initialized.
660                 */
661 kumpf  1.60     CIMConstProperty getProperty(Uint32 index) const;
662 kumpf  1.37 
663 kumpf  1.73     /**
664                     Gets the number of properties in the class.
665                     @return An integer count of the properties in the CIMConstClass.
666                     @exception UninitializedObjectException If the object is not
667                         initialized.
668                 */
669 kumpf  1.37     Uint32 getPropertyCount() const;
670             
671 kumpf  1.73     /**
672                     Finds a method by name.
673                     @param name A CIMName specifying the name of the method to be found.
674                     @return Index of the method if found or PEG_NOT_FOUND if not found.
675                     @exception UninitializedObjectException If the object is not
676                         initialized.
677                 */
678 kumpf  1.53     Uint32 findMethod(const CIMName& name) const;
679 kumpf  1.37 
680 kumpf  1.73     /**
681                     Gets the method at the specified index.
682                     @param index The index of the method to be retrieved.
683                     @return The CIMConstMethod at the specified index.
684                     @exception IndexOutOfBoundsException If the index is outside
685                         the range of methods available for the CIMConstClass.
686                     @exception UninitializedObjectException If the object is not
687                         initialized.
688                 */
689 kumpf  1.60     CIMConstMethod getMethod(Uint32 index) const;
690 kumpf  1.37 
691 kumpf  1.73     /**
692                     Gets the number of methods in the class.
693                     @return An integer count of the methods in the CIMConstClass.
694                     @exception UninitializedObjectException If the object is not
695                         initialized.
696                 */
697 kumpf  1.37     Uint32 getMethodCount() const;
698             
699 kumpf  1.73     /**
700                     Gets the list of key properties in this class.  The Key qualifier
701                     on CIMConstProperty objects is used to locate key properties.
702                     @return An Array of CIMName objects containing the names of the key
703                     properties.
704                     @exception UninitializedObjectException If the object is not
705                         initialized.
706                 */
707 kumpf  1.53     void getKeyNames(Array<CIMName>& keyNames) const;
708 kumpf  1.37 
709 kumpf  1.73     /**
710                     Indicates whether this class contains key properties.  The Key
711                     qualifier on CIMConstProperty objects is used to make this
712                     determination.
713                     @return True if this class contains key properties, false otherwise.
714                     @exception UninitializedObjectException If the object is not
715                         initialized.
716                 */
717 kumpf  1.37     Boolean hasKeys() const;
718             
719 kumpf  1.73     /**
720                     Makes a deep copy of the class.  This creates a new copy of all
721                     the class attributes including qualifiers, properties, and methods.
722                     @return A CIMClass object with a separate copy of the
723                         CIMConstClass object.
724                     @exception UninitializedObjectException If the object is not
725                         initialized.
726                 */
727 kumpf  1.37     CIMClass clone() const;
728             
729 kumpf  1.73     /**
730                     Compares the CIMConstClass with a specified CIMConstClass.
731                     @param x The CIMConstClass to be compared.
732                     @return True if this class is identical to the one specified,
733                         false otherwise.
734                     @exception UninitializedObjectException If the object is not
735                         initialized.
736                 */
737 kumpf  1.37     Boolean identical(const CIMConstClass& x) const;
738             
739 kumpf  1.73     /**
740                     Determines whether the object has been initialized.
741                     @return True if the object has not been initialized, false otherwise.
742                 */
743 kumpf  1.56     Boolean isUninitialized() const;
744 mike   1.25 
745             private:
746             
747 kumpf  1.37     CIMClassRep* _rep;
748 mike   1.25 
749 kumpf  1.37     void _checkRep() const;
750 mike   1.25 
751                 friend class CIMClassRep;
752                 friend class CIMClass;
753                 friend class CIMInstanceRep;
754 mike   1.27     friend class CIMObject;
755                 friend class CIMConstObject;
756 kumpf  1.42     friend class XmlWriter;
757 kumpf  1.43     friend class MofWriter;
758 schuur 1.64     friend class BinaryStreamer;
759 mike   1.25 };
760             
761             PEGASUS_NAMESPACE_END
762             
763             #endif /* Pegasus_CIMClass_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2