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

Diff for /pegasus/src/Pegasus/Common/CIMClass.h between version 1.3 and 1.29

version 1.3, 2001/02/20 05:16:57 version 1.29, 2002/01/09 19:09:38
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a  // Permission is hereby granted, free of charge, to any person obtaining a copy
 // copy of this software and associated documentation files (the "Software"),  // of this software and associated documentation files (the "Software"), to
 // to deal in the Software without restriction, including without limitation  // deal in the Software without restriction, including without limitation the
 // the rights to use, copy, modify, merge, publish, distribute, sublicense,  // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 // and/or sell copies of the Software, and to permit persons to whom the  // sell copies of the Software, and to permit persons to whom the Software is
 // Software is furnished to do so, subject to the following conditions:  // furnished to do so, subject to the following conditions:
 // //
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL  // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING  // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER  // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 // DEALINGS IN THE SOFTWARE.  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
   // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //END_LICENSE  //==============================================================================
 //BEGIN_HISTORY  
 // //
 // Author:  // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // $Log$  // Modified By:
 // Revision 1.3  2001/02/20 05:16:57  mike  
 // Implemented CIMInstance::getInstanceName()  
 // //
 // Revision 1.2  2001/02/19 01:47:16  mike  //%/////////////////////////////////////////////////////////////////////////////
 // Renamed names of the form CIMConst to ConstCIM.  
 //  
 // Revision 1.1  2001/02/18 18:39:05  mike  
 // new  
 //  
 // Revision 1.2  2001/02/18 03:56:00  mike  
 // Changed more class names (e.g., ConstClassDecl -> ConstCIMClass)  
 //  
 // Revision 1.1  2001/02/16 02:06:06  mike  
 // Renamed many classes and headers.  
 //  
 // Revision 1.5  2001/01/30 23:39:00  karl  
 // Add doc++ Documentation to header files  
 //  
 // Revision 1.4  2001/01/28 18:48:07  mike  
 // fixed typo in comment  
 //  
 // Revision 1.3  2001/01/28 18:46:50  mike  
 // more docs  
 //  
 // Revision 1.2  2001/01/15 04:31:43  mike  
 // worked on resolve scheme  
 //  
 // Revision 1.1.1.1  2001/01/14 19:50:37  mike  
 // Pegasus import  
 //  
 //  
 //END_HISTORY  
  
 #ifndef Pegasus_ClassDecl_h  #ifndef Pegasus_CIMClass_h
 #define Pegasus_ClassDecl_h  #define Pegasus_CIMClass_h
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
   #include <Pegasus/Common/CIMObject.h>
 #include <Pegasus/Common/CIMClassRep.h> #include <Pegasus/Common/CIMClassRep.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 class ConstCIMClass;  class CIMConstClass;
   class CIMObject;
   class CIMConstObject;
   
   // REVIEW: redocument.
  
 /** The CIMClass class is used to represent CIM classes in Pegasus.  In CIM, /** The CIMClass class is used to represent CIM classes in Pegasus.  In CIM,
     a class object may be a class or an associator.  A CIM class must contain a     a class object may be a class or an associator.  A CIM class must contain a
Line 73 
Line 48 
     instances, all of which support a common type (for example, a set of     instances, all of which support a common type (for example, a set of
     properties, methods, and associations).     properties, methods, and associations).
 */ */
   
 class PEGASUS_COMMON_LINKAGE CIMClass class PEGASUS_COMMON_LINKAGE CIMClass
 { {
 public: public:
  
     /** Constructor - Creates and instantiates a new object reprenting a CIM      /** Constructor - Creates an uninitiated a new CIM object
         class. If you use this constructor, use setName to define a name for          reprenting a CIM class. The class object created by this
         the class          constructor can only be used in an operation such as the
           copy constructor.  It cannot be used to create a class by
           appending names, properties, etc. since it is unitiated.
   
           Use one of the other constructors to create an initiated new CIM class
           object.
           @exception Throws an exception "unitialized handle" if this
           unitialized handle is used
           /REF(HPEGASUS_HANDLES)
     */     */
     CIMClass() : _rep(0)     CIMClass() : _rep(0)
     {     {
   
     }     }
  
     /// Constructor - Creates a class from a previous class      /** Constructor - Creates a class from a previous class
       */
     CIMClass(const CIMClass& x)     CIMClass(const CIMClass& x)
     {     {
         Inc(_rep = x._rep);         Inc(_rep = x._rep);
     }     }
  
     /// Operator = ATTN:      PEGASUS_EXPLICIT CIMClass(const CIMObject& x);
   
       PEGASUS_EXPLICIT CIMClass(const CIMObject& x, NoThrow&);
   
       /** Assignment operator.
       */
     CIMClass& operator=(const CIMClass& x)     CIMClass& operator=(const CIMClass& x)
     {     {
         if (x._rep != _rep)         if (x._rep != _rep)
Line 106 
Line 93 
  
     /**  Constructor - Creates a Class from inputs of a classname and     /**  Constructor - Creates a Class from inputs of a classname and
         SuperClassName         SuperClassName
         @param className - String representing name of the class being created          @param className String representing name of the class being created
         @param superClassName - String representing name of the SuperClass          @param superClassName String representing name of the SuperClass
         ATTN: Define what makes up legal name.         ATTN: Define what makes up legal name.
         @return Throws IllegalName if className argument illegal CIM identifier.         @return Throws IllegalName if className argument illegal CIM identifier.
           <pre>
               CIMClass NewCass("MyClass", "YourClass");
           </pre>
   
     */     */
     CIMClass(     CIMClass(
         const String& className,          const CIMReference& reference,
         const String& superClassName = String())         const String& superClassName = String())
     {     {
         _rep = new CIMClassRep(className, superClassName);          _rep = new CIMClassRep(reference, superClassName);
     }     }
  
     /// Destructor     /// Destructor
Line 124 
Line 115 
         Dec(_rep);         Dec(_rep);
     }     }
  
     /** CIMMethod isAssociation - Identifies whether or not this CIM class      /** isAssociation - Identifies whether or not this CIM class
         is an association. An association is a relationship between two         is an association. An association is a relationship between two
         (or more) classes or instances of two classes.  The properties of an         (or more) classes or instances of two classes.  The properties of an
         association class include pointers, or references, to the two (or         association class include pointers, or references, to the two (or
         more) instances. All CIM classes can be included in one or more         more) instances. All CIM classes can be included in one or more
         associations.  ATTN: Move the association definition elsewhere          associations.
         @return  Boolean True if this CIM class belongs to an association;         @return  Boolean True if this CIM class belongs to an association;
         otherwise, false.         otherwise, false.
     */     */
Line 139 
Line 130 
         return _rep->isAssociation();         return _rep->isAssociation();
     }     }
  
     ///  CIMMethod isAbstract      /** isAbstract Test if the CIMClass is abstract.
           @return - True if the CIMClass Object is abstract
           SeeAlso: Abstract
       */
     Boolean isAbstract() const     Boolean isAbstract() const
     {     {
         _checkRep();         _checkRep();
         return _rep->isAbstract();         return _rep->isAbstract();
     }     }
  
     /** CIMMethod Gets the name of the class      /** getClassName Gets the name of the class
         ATTN: COMMENT. Why not just get name so we have common method for all.         ATTN: COMMENT. Why not just get name so we have common method for all.
           @return Returns string with the class name.
     */     */
     const String& getClassName() const     const String& getClassName() const
     {     {
Line 155 
Line 150 
         return _rep->getClassName();         return _rep->getClassName();
     }     }
  
     /** CIMMethod getSuperClassName - Gets the name of the Parent      const CIMReference& getPath() const
       {
           _checkRep();
           return _rep->getPath();
       }
   
       /** getSuperClassName - Gets the name of the Parent
         @return String with parent class name.         @return String with parent class name.
     */     */
     const String& getSuperClassName() const     const String& getSuperClassName() const
Line 164 
Line 165 
         return _rep->getSuperClassName();         return _rep->getSuperClassName();
     }     }
  
     /** CIMMethod setSuperClassName - Sets the name of the parent class from      /** setSuperClassName - Sets the name of the parent class from
         the input parameter. \REF{CLASSNAME}. ATTN: Define legal classnames         the input parameter. \REF{CLASSNAME}. ATTN: Define legal classnames
         @param - String defining parent name.          @param String defining parent name.
         @return Throws IllegalName if superClassName argument not legal CIM         @return Throws IllegalName if superClassName argument not legal CIM
         identifier.          identifier
           @exception throws IllegalName if the name is not correct. See
           \URL[ClassNames]{DefinitionofTerms.html#CLASSNAME}
     */     */
     void setSuperClassName(const String& superClassName)     void setSuperClassName(const String& superClassName)
     {     {
Line 176 
Line 179 
         _rep->setSuperClassName(superClassName);         _rep->setSuperClassName(superClassName);
     }     }
  
     /** CIMMethod addQualifier - Adds the specified qualifier to the class      /** addQualifier - Adds the specified qualifier to the class
         and increments the qualifier count. It is illegal to add the same         and increments the qualifier count. It is illegal to add the same
         qualifier more than one time.         qualifier more than one time.
         @param - CIMQualifier object representing the qualifier to be added          @param qualifier CIMQualifier object representing the qualifier to be
         ATTN: Pointer to qualifier object.          added
         @return Throws AlreadyExists.          @return Returns handle of the class object
           @exception Throws AlreadyExists.
     */     */
     CIMClass& addQualifier(const CIMQualifier& qualifier)     CIMClass& addQualifier(const CIMQualifier& qualifier)
     {     {
Line 190 
Line 194 
         return *this;         return *this;
     }     }
  
     /** CIMMethod findQualifier - Finds a qualifier with the specified input      /** findQualifier - Searches for a qualifier with the specified `
         name if it exists in the class @param name CIMName of the qualifier          input name if it exists in the class
         to be found @return Position of the qualifier in the Class ATTN:          @param name CIMName of the qualifier
         Clarify the return.  What if not found, etc.          to be found @return Position of the qualifier in the Class.
           @return Returns index of the qualifier found or PEG_NOT_FOUND
           if not found.
     */     */
     Uint32 findQualifier(const String& name)     Uint32 findQualifier(const String& name)
     {     {
         _checkRep();         _checkRep();
         return _rep->findQualifier(name);         return _rep->findQualifier(name);
     }     }
       ///
     /** CIMMethod FindQualifier - ATTN:  
         @param name of the qualifier to be found  
         @return ATTN: Define this  
     */  
     Uint32 findQualifier(const String& name) const     Uint32 findQualifier(const String& name) const
     {     {
         _checkRep();         _checkRep();
         return _rep->findQualifier(name);         return _rep->findQualifier(name);
     }     }
       /** existsQualifier - Returns true if the qualifier with the
       specified name exists in the class
       @param name String name of the qualifier object being tested.
       @return True if the qualifier exits.  Otherwise false is returned.
       */
       Boolean existsQualifier(const String& name)
       {
           _checkRep();
           return _rep->existsQualifier(name);
       }
       ///
       Boolean existsQualifier(const String& name) const
       {
           _checkRep();
           return _rep->existsQualifier(name);
       }
  
     /**  CIMMethod getQualifier - Gets the CIMQualifier object defined      /** getQualifier - Gets the CIMQualifier object defined
         by the input parameter         by the input parameter
         @param pos defines the position of the qualifier in the class from the         @param pos defines the position of the qualifier in the class from the
         findQualifier method         findQualifier method
         @return CIMQualifier object representing the qualifier found.          @return CIMQualifier object representing the qualifier found. On error,
         ATTN: what is error return here?              CIMQualifier handle will be null.
     */     */
     CIMQualifier getQualifier(Uint32 pos)     CIMQualifier getQualifier(Uint32 pos)
     {     {
Line 224 
Line 242 
         return _rep->getQualifier(pos);         return _rep->getQualifier(pos);
     }     }
  
     /// CIMMethod getQualifier - ATTN:      /// getQualifier - ATTN:
     CIMConstQualifier getQualifier(Uint32 pos) const     CIMConstQualifier getQualifier(Uint32 pos) const
     {     {
         _checkRep();         _checkRep();
         return _rep->getQualifier(pos);         return _rep->getQualifier(pos);
     }     }
  
     /** CIMMethod getQualifierCount - Returns the number of qualifiers      /** removeQualifier - Removes the qualifier defined by the
       index parameter.
       @param Defines the index of the qualifier to be removed.
       @return There is no return.
       @exception Throw OutOfBound exception if the index is outside
       the range of existing qualifier objects for this class
       */
       void removeQualifier(Uint32 pos) const
       {
           _checkRep();
           _rep->removeQualifier(pos);
       }
   
       /** getQualifierCount - Returns the number of qualifiers
         in the class.         in the class.
         @return ATTN:         @return ATTN:
     */     */
Line 241 
Line 272 
         return _rep->getQualifierCount();         return _rep->getQualifierCount();
     }     }
  
     /** CIMMethod addProperty - Adds the specified property object to the      /** addProperty - Adds the specified property object to the
         properties in the CIM class         properties in the CIM class
     */     */
     CIMClass& addProperty(const CIMProperty& x)     CIMClass& addProperty(const CIMProperty& x)
Line 251 
Line 282 
         return *this;         return *this;
     }     }
  
     /** CIMMethod removeProperty - Removes the property represented      /** findProperty - Finds the property object with the
         by the position input parameter from the class  
         @param position parameter for the property to be removed from the  
         findPropety method  
         @return ATTN:  
     */  
     void removeProperty(Uint32 pos)  
     {  
         _checkRep();  
         _rep->removeProperty(pos);  
     }  
   
     /** CIMMethod findProperty - Finds the property object with the  
         name defined by the input parameter in the class.         name defined by the input parameter in the class.
         @param String parameter with the property name.         @param String parameter with the property name.
         @return position representing the property object found.          @return position representing the property object found or
         ATTN:   Clarify case of not found          PEG_NOT_FOUND if the property is not found.
     */     */
     Uint32 findProperty(const String& name)     Uint32 findProperty(const String& name)
     {     {
Line 275 
Line 294 
         return _rep->findProperty(name);         return _rep->findProperty(name);
     }     }
  
     /// CIMMethod findProperty  
     Uint32 findProperty(const String& name) const     Uint32 findProperty(const String& name) const
     {     {
         _checkRep();         _checkRep();
         return _rep->findProperty(name);         return _rep->findProperty(name);
     }     }
  
     /** CIMMethod getProperty - Returns a property representing the property      /** existsPropery - Determines if a property object with the
           name defined by the input parameter exists in the class.
           @parm String parameter with the property name.
           @return True if the property object exists.
       */
       Boolean existsProperty(const String& name)
       {
           _checkRep();
           return _rep->existsProperty(name);
       }
   
           Boolean existsProperty(const String& name) const
       {
          _checkRep();
          return _rep->existsProperty(name);
       }
   
       /** getProperty - Returns a property representing the property
         defined by the input parameter         defined by the input parameter
         @param position for this property         @param position for this property
         ATTN: Should we not use something like handle for position???         ATTN: Should we not use something like handle for position???
Line 295 
Line 330 
         return _rep->getProperty(pos);         return _rep->getProperty(pos);
     }     }
  
     /// CIMMethod getProperty - ATTN      /**getProperty Gets a property object from the CIMClass
     ConstCIMProperty getProperty(Uint32 pos) const          @param pos The index of the property object to get.
           @return Returns handle of the property object requested
           @exception Throws OutofBounds if the size field is greather than the
           bunber of properties in the class.
       */
       CIMConstProperty getProperty(Uint32 pos) const
     {     {
         _checkRep();         _checkRep();
         return _rep->getProperty(pos);         return _rep->getProperty(pos);
     }     }
  
     /** CIMMethod getProperty -   Gets the count of the number of properties      /** removeProperty - Removes the property represented
           by the position input parameter from the class
           @param pos Index to the property to be removed from the
           findPropety method
           @exception Throws OutofBounds if index is not a property object
       */
       void removeProperty(Uint32 pos)
       {
           _checkRep();
           _rep->removeProperty(pos);
       }
   
       /** getPropertyCount -   Gets the count of the number of properties
         defined in the class.         defined in the class.
         @return count of number of proerties in the class         @return count of number of proerties in the class
     */     */
Line 312 
Line 364 
         return _rep->getPropertyCount();         return _rep->getPropertyCount();
     }     }
  
     /** CIMMethod addMethod - Adds the method object defined by the input      /** addMethod - Adds the method object defined by the input
         parameter to the class and increments the count of the number of         parameter to the class and increments the count of the number of
         methods in the class         methods in the class
         @param - method object representing the method to be added          @param method object representing the method to be added
           @return Returns the CIMClass object to which the method was added.
           @exception Throws AlreadyExists if the method already exists and throws
           UnitializedHandle if the handle is not initialized
     */     */
     CIMClass& addMethod(const CIMMethod& x)     CIMClass& addMethod(const CIMMethod& x)
     {     {
Line 324 
Line 379 
         return *this;         return *this;
     }     }
  
     /** CIMMethod findMethod - Located the method object defined by the      /** findMethod - Locate the method object defined by the
         name input         name input
         @param String representing the name of the method to be found         @param String representing the name of the method to be found
         @return Position of the method object in the class to be used in         @return Position of the method object in the class to be used in
Line 336 
Line 391 
         return _rep->findMethod(name);         return _rep->findMethod(name);
     }     }
  
     /// CIMMethod findMethod - ATTN:  
     Uint32 findMethod(const String& name) const     Uint32 findMethod(const String& name) const
     {     {
         _checkRep();         _checkRep();
         return _rep->findMethod(name);         return _rep->findMethod(name);
     }     }
  
     /** CIMMethod getMethod - Gets the method object defined by the       /** existsMethod - Determine if the method object defined by the
           name input exists
           @param String representing the name of the method to be found
           @return True if the method exists
       */
       Boolean existsMethod(const String& name)
       {
           _checkRep();
           return _rep->existsMethod(name);
       }
   
       Boolean existsMethod(const String& name) const
       {
           _checkRep();
           return _rep->existsMethod(name);
       }
   
   
       /** getMethod - Gets the method object defined by the
         input parameter.         input parameter.
         @param   ATTN:          @param pos Index to the method object to get
         @ method object representing the method defined          @return Returns handle of the method requested
         ATTN: Error???          @exception Throws OutofBounds if the index represented by pos is greater
           than the number of methods defined in the class object
     */     */
     CIMMethod getMethod(Uint32 pos)     CIMMethod getMethod(Uint32 pos)
     {     {
Line 355 
Line 428 
         return _rep->getMethod(pos);         return _rep->getMethod(pos);
     }     }
  
     /// CIMMethod getMethod - ATTN:      /** getMethod Gets the method object defined by the input
       parameter. This is the const version.
       */
   
     CIMConstMethod getMethod(Uint32 pos) const     CIMConstMethod getMethod(Uint32 pos) const
     {     {
         _checkRep();         _checkRep();
         return _rep->getMethod(pos);         return _rep->getMethod(pos);
     }     }
  
     /** CIMMethod getMethodCount - Count of the number of methods in the class      /** removeMethod - Removes the method defined by the
         @return integer representing the number of methods in the class      index parameter.
       @param Defines the index of the method to be removed.
       @return There is no return.
       @exception Throw OutOfBound exception if the index is outside
       the range of existing method objects for this class
       */
       void removeMethod(Uint32 pos) const
       {
           _checkRep();
           _rep->removeMethod(pos);
       }
   
       /** getMethodCount - Count of the number of methods in the class
           @return integer representing the number of methods in the class object.
     */     */
     Uint32 getMethodCount() const     Uint32 getMethodCount() const
     {     {
Line 371 
Line 460 
         return _rep->getMethodCount();         return _rep->getMethodCount();
     }     }
  
     /** CIMMethod Resolve -  Resolve the class: inherit any properties and      /** Resolve -  Resolve the class: inherit any properties and
         qualifiers. Make sure the superClass really exists and is consistent         qualifiers. Make sure the superClass really exists and is consistent
         with this class. Also set the propagated flag class-origin for each         with this class. Also set the propagated flag class-origin for each
         class feature.         class feature.
Line 388 
Line 477 
     /// operator - ATTN:     /// operator - ATTN:
     operator int() const { return _rep != 0; }     operator int() const { return _rep != 0; }
  
     /// CIMMethod toXML      /** toXML  - prepares an XML representation of the CIMClass object
           in the provided Sint8 variable.
           @param out Sint8 array for the XML representation
       */
     void toXml(Array<Sint8>& out) const     void toXml(Array<Sint8>& out) const
     {     {
         _checkRep();         _checkRep();
         _rep->toXml(out);         _rep->toXml(out);
     }     }
  
     /// CIMMethod print      /** print -  Prints the toXML output to cout
     void print() const      */
       void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
     {     {
         _checkRep();         _checkRep();
         _rep->print();          _rep->print(o);
     }     }
  
     /** CIMMethod identical -  Compares with another class      /** toMof  - prepares a MOF representation of the CIMClass object
           in the provided Sint8 variable.
           @param out Sint8 array for the XML representation
       */
       void toMof(Array<Sint8>& out) const
       {
           _checkRep();
           _rep->toMof(out);
       }
       /** printMof -  Prints the toMof output to cout
       */
       void printMof(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
       {
           _checkRep();
           _rep->printMof(o);
       }
   
       /** identical -  Compares with another class
         ATTN: Clarify exactly what identical means         ATTN: Clarify exactly what identical means
         @parm Class object for the class to be compared          @param Class object for the class to be compared
         @return True if the classes are identical         @return True if the classes are identical
     */     */
     Boolean identical(const ConstCIMClass& x) const;      Boolean identical(const CIMConstClass& x) const;
  
     /// CIMMethod clone - ATTN:      /** Makes a deep copy (clone) of the given object. */
     CIMClass clone() const     CIMClass clone() const
     {     {
         return CIMClass(_rep->clone());          return CIMClass((CIMClassRep*)(_rep->clone()));
     }     }
  
       /** Get names of all keys of this class. */
     void getKeyNames(Array<String>& keyNames) const     void getKeyNames(Array<String>& keyNames) const
     {     {
         _checkRep();         _checkRep();
         _rep->getKeyNames(keyNames);         _rep->getKeyNames(keyNames);
     }     }
  
       Boolean hasKeys() const
       {
           _checkRep();
           return _rep->hasKeys();
       }
   
 private: private:
  
     CIMClass(CIMClassRep* rep) : _rep(rep)     CIMClass(CIMClassRep* rep) : _rep(rep)
Line 430 
Line 547 
     void _checkRep() const     void _checkRep() const
     {     {
         if (!_rep)         if (!_rep)
             throw UnitializedHandle();              ThrowUnitializedHandle();
     }     }
  
     CIMClassRep* _rep;     CIMClassRep* _rep;
     friend class ConstCIMClass;      friend class CIMConstClass;
       friend class CIMObject;
       friend class CIMConstObject;
 }; };
  
 /** ConstCIMClass  #define PEGASUS_ARRAY_T CIMClass
   # include "ArrayInter.h"
   #undef PEGASUS_ARRAY_T
  
 */  /** CIMConstClass - ATTN: define this.
  
 class PEGASUS_COMMON_LINKAGE ConstCIMClass  */
   class PEGASUS_COMMON_LINKAGE CIMConstClass
 { {
 public: public:
  
     ConstCIMClass() : _rep(0)      CIMConstClass() : _rep(0)
     {     {
   
     }     }
  
     ConstCIMClass(const ConstCIMClass& x)      CIMConstClass(const CIMConstClass& x)
     {     {
         Inc(_rep = x._rep);         Inc(_rep = x._rep);
     }     }
  
     ConstCIMClass(const CIMClass& x)      CIMConstClass(const CIMClass& x)
     {     {
         Inc(_rep = x._rep);         Inc(_rep = x._rep);
     }     }
  
     ConstCIMClass& operator=(const ConstCIMClass& x)      PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x);
   
       PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x);
   
       PEGASUS_EXPLICIT CIMConstClass(const CIMObject& x, NoThrow&);
   
       PEGASUS_EXPLICIT CIMConstClass(const CIMConstObject& x, NoThrow&);
   
       CIMConstClass& operator=(const CIMConstClass& x)
     {     {
         if (x._rep != _rep)         if (x._rep != _rep)
         {         {
Line 470 
Line 599 
         return *this;         return *this;
     }     }
  
     ConstCIMClass& operator=(const CIMClass& x)      CIMConstClass& operator=(const CIMClass& x)
     {     {
         if (x._rep != _rep)         if (x._rep != _rep)
         {         {
Line 482 
Line 611 
  
     // Throws IllegalName if className argument not legal CIM identifier.     // Throws IllegalName if className argument not legal CIM identifier.
  
     ConstCIMClass(      CIMConstClass(
         const String& className,          const CIMReference& reference,
         const String& superClassName = String())         const String& superClassName = String())
     {     {
         _rep = new CIMClassRep(className, superClassName);          _rep = new CIMClassRep(reference, superClassName);
     }     }
  
     ~ConstCIMClass()      ~CIMConstClass()
     {     {
         Dec(_rep);         Dec(_rep);
     }     }
Line 512 
Line 641 
         return _rep->getClassName();         return _rep->getClassName();
     }     }
  
       const CIMReference& getPath() const
       {
           _checkRep();
           return _rep->getPath();
       }
   
     const String& getSuperClassName() const     const String& getSuperClassName() const
     {     {
         _checkRep();         _checkRep();
Line 542 
Line 677 
         return _rep->findProperty(name);         return _rep->findProperty(name);
     }     }
  
     ConstCIMProperty getProperty(Uint32 pos) const      CIMConstProperty getProperty(Uint32 pos) const
     {     {
         _checkRep();         _checkRep();
         return _rep->getProperty(pos);         return _rep->getProperty(pos);
Line 580 
Line 715 
         _rep->toXml(out);         _rep->toXml(out);
     }     }
  
     void print() const      void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const
     {     {
         _checkRep();         _checkRep();
         _rep->print();          _rep->print(o);
     }     }
  
     Boolean identical(const ConstCIMClass& x) const      Boolean identical(const CIMConstClass& x) const
     {     {
         x._checkRep();         x._checkRep();
         _checkRep();         _checkRep();
Line 595 
Line 730 
  
     CIMClass clone() const     CIMClass clone() const
     {     {
         return CIMClass(_rep->clone());          return CIMClass((CIMClassRep*)(_rep->clone()));
     }     }
  
     void getKeyNames(Array<String>& keyNames) const     void getKeyNames(Array<String>& keyNames) const
Line 604 
Line 739 
         _rep->getKeyNames(keyNames);         _rep->getKeyNames(keyNames);
     }     }
  
       Boolean hasKeys() const
       {
           _checkRep();
           return _rep->hasKeys();
       }
   
 private: private:
  
     void _checkRep() const     void _checkRep() const
     {     {
         if (!_rep)         if (!_rep)
             throw UnitializedHandle();              ThrowUnitializedHandle();
     }     }
  
     CIMClassRep* _rep;     CIMClassRep* _rep;
Line 617 
Line 758 
     friend class CIMClassRep;     friend class CIMClassRep;
     friend class CIMClass;     friend class CIMClass;
     friend class CIMInstanceRep;     friend class CIMInstanceRep;
       friend class CIMObject;
       friend class CIMConstObject;
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
 #endif /* Pegasus_ClassDecl_h */  #endif /* Pegasus_CIMClass_h */


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.29

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2