(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 kumpf 1.75     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 kumpf 1.74         Indicates whether this class is an association class.  An
125                    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 kumpf 1.74 
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 kumpf 1.74         is designed specifically for providers to allow them to easily build
416 kumpf 1.73         instance objects using the parameters provided with the CIM instance
417 kumpf 1.74         operations such as getInstance and enumerateInstances.
418 kumpf 1.73 
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 kumpf 1.74 
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 kumpf 1.74         it simply does not add that property to the instance.
448            
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 mike  1.25     friend class CIMConstClass;
466                friend class CIMObject;
467 mike  1.27     friend class CIMConstObject;
468 kumpf 1.51     friend class Resolver;
469 kumpf 1.42     friend class XmlWriter;
470 kumpf 1.43     friend class MofWriter;
471 schuur 1.64     friend class BinaryStreamer;
472 mike   1.25 };
473             
474             #define PEGASUS_ARRAY_T CIMClass
475 kumpf  1.47 #include <Pegasus/Common/ArrayInter.h>
476 mike   1.25 #undef PEGASUS_ARRAY_T
477             
478 kumpf  1.73 
479             /**
480                 The CIMConstClass class provides a const interface to a CIMClass
481                 object.  This class is needed because the shared representation model
482                 used by CIMClass does not prevent modification to a const CIMClass
483                 object.  Note that the value of a CIMConstClass object could still be
484                 modified by a CIMClass object that refers to the same data copy.
485             */
486 mike   1.25 class PEGASUS_COMMON_LINKAGE CIMConstClass
487             {
488             public:
489             
490 kumpf  1.73     /**
491                     Constructs an uninitialized CIMConstClass object.  A method
492                     invocation on an uninitialized object will result in the throwing
493                     of an UninitializedObjectException.  An uninitialized object may
494                     be converted into an initialized object only by using the assignment
495                     operator with an initialized object.
496                 */
497 kumpf  1.37     CIMConstClass();
498             
499 kumpf  1.73     /**
500                     Constructs a CIMConstClass object from the value of a specified
501                     CIMConstClass object, so that both objects refer to the same data copy.
502                     @param x The CIMConstClass object from which to construct a new
503                         CIMConstClass object.
504                 */
505 kumpf  1.37     CIMConstClass(const CIMConstClass& x);
506             
507 kumpf  1.73     /**
508                     Constructs a CIMConstClass object from the value of a specified
509                     CIMClass object, so that both objects refer to the same data copy.
510                     @param x The CIMClass object from which to construct a new
511                         CIMConstClass object.
512                 */
513 kumpf  1.37     CIMConstClass(const CIMClass& x);
514 mike   1.25 
515 kumpf  1.73     /**
516                     Constructs a CIMConstClass object from the value of a specified
517                     CIMObject object, so that both objects refer to the same data copy.
518                     @param x The CIMObject object from which to construct the
519                         CIMConstClass object.
520                     @exception DynamicCastFailedException If a CIMConstClass can not be
521                         created from the given CIMObject.
522                 */
523 kumpf  1.75     explicit CIMConstClass(const CIMObject& x);
524 mike   1.27 
525 kumpf  1.73     /**
526                     Constructs a CIMConstClass object from the value of a specified
527                     CIMConstObject object, so that both objects refer to the same data
528                     copy.
529                     @param x The CIMConstObject object from which to construct the
530                         CIMConstClass object.
531                     @exception DynamicCastFailedException If a CIMConstClass can not be
532                         created from the given CIMConstObject.
533                 */
534 kumpf  1.75     explicit CIMConstClass(const CIMConstObject& x);
535 mike   1.27 
536 kumpf  1.73     /**
537                     Constructs a CIMConstClass object with the specified attributes.
538                     @param className A CIMName specifying the name of the class.
539                     @param superClassName A CIMName specifying name of the parent class.
540                         (A null value indicates no superclass.)
541                 */
542 mike   1.25     CIMConstClass(
543 kumpf  1.73         const CIMName& className,
544                     const CIMName& superClassName = CIMName());
545 kumpf  1.37 
546 kumpf  1.73     /**
547                     Assigns the value of the specified CIMConstClass object to this
548                     object, so that both objects refer to the same data copy.
549                     @param x The CIMConstClass object from which to assign this
550                         CIMConstClass object.
551                     @return A reference to this CIMConstClass object.
552                 */
553 kumpf  1.37     CIMConstClass& operator=(const CIMConstClass& x);
554             
555 kumpf  1.73     /**
556                     Assigns the value of the specified CIMClass object to this
557                     object, so that both objects refer to the same data copy.
558                     @param x The CIMClass object from which to assign this
559                         CIMConstClass object.
560                     @return A reference to this CIMConstClass object.
561                 */
562 kumpf  1.37     CIMConstClass& operator=(const CIMClass& x);
563             
564 kumpf  1.73     /**
565                     Destructs the CIMConstClass object.
566                 */
567 kumpf  1.37     ~CIMConstClass();
568             
569 kumpf  1.73     /**
570 kumpf  1.74         Indicates whether this class is an association class.  An
571                     association is a relationship between two (or more) classes or
572 kumpf  1.73         instances.  The Association qualifier is used to make this
573                     determination.
574                     @return True if this class is an association class, false otherwise.
575                     @exception UninitializedObjectException If the object is not
576                         initialized.
577                 */
578 kumpf  1.37     Boolean isAssociation() const;
579             
580 kumpf  1.73     /**
581                     Indicates whether this class is an abstract class.
582                     The Abstract qualifier is used to make this determination.
583                     @return True if this class is an abstract class, false otherwise.
584                     @exception UninitializedObjectException If the object is not
585                         initialized.
586                 */
587 kumpf  1.37     Boolean isAbstract() const;
588             
589 kumpf  1.73     /**
590                     Gets the name of the class.
591                     @return A CIMName containing the class name.
592                     @exception UninitializedObjectException If the object is not
593                         initialized.
594                 */
595 kumpf  1.53     const CIMName& getClassName() const;
596 kumpf  1.37 
597 kumpf  1.73     /**
598                     Gets the object path for the class.
599                     @return A CIMObjectPath containing the object path.
600                     @exception UninitializedObjectException If the object is not
601                         initialized.
602                 */
603 kumpf  1.44     const CIMObjectPath& getPath() const;
604 kumpf  1.37 
605 kumpf  1.73     /**
606                     Gets the name of the parent class of this class.
607                     @return A CIMName containing parent class name.
608                     @exception UninitializedObjectException If the object is not
609                         initialized.
610                 */
611 kumpf  1.53     const CIMName& getSuperClassName() const;
612 kumpf  1.37 
613 kumpf  1.73     /**
614                     Finds a qualifier by name.
615                     @param name A CIMName specifying the name of the qualifier to be found.
616                     @return Index of the qualifier if found or PEG_NOT_FOUND if not found.
617                     @exception UninitializedObjectException If the object is not
618                         initialized.
619                 */
620 kumpf  1.53     Uint32 findQualifier(const CIMName& name) const;
621 kumpf  1.37 
622 kumpf  1.73     /**
623                     Gets the qualifier at the specified index.
624                     @param index The index of the qualifier to be retrieved.
625                     @return The CIMConstQualifier at the specified index.
626                     @exception IndexOutOfBoundsException If the index is outside
627                         the range of qualifiers available for the CIMConstClass.
628                     @exception UninitializedObjectException If the object is not
629                         initialized.
630                 */
631 kumpf  1.60     CIMConstQualifier getQualifier(Uint32 index) const;
632 kumpf  1.37 
633 kumpf  1.73     /**
634                     Gets the number of qualifiers in the class.
635                     @return An integer count of the qualifiers in the CIMConstClass.
636                     @exception UninitializedObjectException If the object is not
637                         initialized.
638                 */
639 kumpf  1.37     Uint32 getQualifierCount() const;
640             
641 kumpf  1.73     /**
642                     Finds a property by name.
643                     @param name A CIMName specifying the name of the property to be found.
644                     @return Index of the property if found or PEG_NOT_FOUND if not found.
645                     @exception UninitializedObjectException If the object is not
646                         initialized.
647                 */
648 kumpf  1.53     Uint32 findProperty(const CIMName& name) const;
649 kumpf  1.37 
650 kumpf  1.73     /**
651                     Gets the property at the specified index.
652                     @param index The index of the property to be retrieved.
653                     @return The CIMConstProperty at the specified index.
654                     @exception IndexOutOfBoundsException If the index is outside
655                         the range of properties available for the CIMConstClass.
656                     @exception UninitializedObjectException If the object is not
657                         initialized.
658                 */
659 kumpf  1.60     CIMConstProperty getProperty(Uint32 index) const;
660 kumpf  1.37 
661 kumpf  1.73     /**
662                     Gets the number of properties in the class.
663                     @return An integer count of the properties in the CIMConstClass.
664                     @exception UninitializedObjectException If the object is not
665                         initialized.
666                 */
667 kumpf  1.37     Uint32 getPropertyCount() const;
668             
669 kumpf  1.73     /**
670                     Finds a method by name.
671                     @param name A CIMName specifying the name of the method to be found.
672                     @return Index of the method if found or PEG_NOT_FOUND if not found.
673                     @exception UninitializedObjectException If the object is not
674                         initialized.
675                 */
676 kumpf  1.53     Uint32 findMethod(const CIMName& name) const;
677 kumpf  1.37 
678 kumpf  1.73     /**
679                     Gets the method at the specified index.
680                     @param index The index of the method to be retrieved.
681                     @return The CIMConstMethod at the specified index.
682                     @exception IndexOutOfBoundsException If the index is outside
683                         the range of methods available for the CIMConstClass.
684                     @exception UninitializedObjectException If the object is not
685                         initialized.
686                 */
687 kumpf  1.60     CIMConstMethod getMethod(Uint32 index) const;
688 kumpf  1.37 
689 kumpf  1.73     /**
690                     Gets the number of methods in the class.
691                     @return An integer count of the methods in the CIMConstClass.
692                     @exception UninitializedObjectException If the object is not
693                         initialized.
694                 */
695 kumpf  1.37     Uint32 getMethodCount() const;
696             
697 kumpf  1.73     /**
698                     Gets the list of key properties in this class.  The Key qualifier
699                     on CIMConstProperty objects is used to locate key properties.
700                     @return An Array of CIMName objects containing the names of the key
701                     properties.
702                     @exception UninitializedObjectException If the object is not
703                         initialized.
704                 */
705 kumpf  1.53     void getKeyNames(Array<CIMName>& keyNames) const;
706 kumpf  1.37 
707 kumpf  1.73     /**
708                     Indicates whether this class contains key properties.  The Key
709                     qualifier on CIMConstProperty objects is used to make this
710                     determination.
711                     @return True if this class contains key properties, false otherwise.
712                     @exception UninitializedObjectException If the object is not
713                         initialized.
714                 */
715 kumpf  1.37     Boolean hasKeys() const;
716             
717 kumpf  1.73     /**
718                     Makes a deep copy of the class.  This creates a new copy of all
719                     the class attributes including qualifiers, properties, and methods.
720                     @return A CIMClass object with a separate copy of the
721                         CIMConstClass object.
722                     @exception UninitializedObjectException If the object is not
723                         initialized.
724                 */
725 kumpf  1.37     CIMClass clone() const;
726             
727 kumpf  1.73     /**
728                     Compares the CIMConstClass with a specified CIMConstClass.
729                     @param x The CIMConstClass to be compared.
730                     @return True if this class is identical to the one specified,
731                         false otherwise.
732                     @exception UninitializedObjectException If the object is not
733                         initialized.
734                 */
735 kumpf  1.37     Boolean identical(const CIMConstClass& x) const;
736             
737 kumpf  1.73     /**
738                     Determines whether the object has been initialized.
739                     @return True if the object has not been initialized, false otherwise.
740                 */
741 kumpf  1.56     Boolean isUninitialized() const;
742 mike   1.25 
743             private:
744             
745 kumpf  1.37     CIMClassRep* _rep;
746 mike   1.25 
747                 friend class CIMClassRep;
748                 friend class CIMClass;
749                 friend class CIMInstanceRep;
750 mike   1.27     friend class CIMObject;
751                 friend class CIMConstObject;
752 kumpf  1.42     friend class XmlWriter;
753 kumpf  1.43     friend class MofWriter;
754 schuur 1.64     friend class BinaryStreamer;
755 mike   1.25 };
756             
757             PEGASUS_NAMESPACE_END
758             
759             #endif /* Pegasus_CIMClass_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2