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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2