(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.9

version 1.3, 2001/02/20 05:16:57 version 1.9, 2001/04/25 22:20:53
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 // //
Line 17 
Line 17 
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE. // 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/CIMClassRep.h> #include <Pegasus/Common/CIMClassRep.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 class ConstCIMClass;  class CIMConstClass;
  
 /** 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 78 
Line 47 
 { {
 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:      /// Operator = Assigns the CIM Class constructor.
     CIMClass& operator=(const CIMClass& x)     CIMClass& operator=(const CIMClass& x)
     {     {
         if (x._rep != _rep)         if (x._rep != _rep)
Line 110 
Line 88 
         @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 String& className,
Line 296 
Line 278 
     }     }
  
     /// CIMMethod getProperty - ATTN     /// CIMMethod getProperty - ATTN
     ConstCIMProperty getProperty(Uint32 pos) const      CIMConstProperty getProperty(Uint32 pos) const
     {     {
         _checkRep();         _checkRep();
         return _rep->getProperty(pos);         return _rep->getProperty(pos);
Line 396 
Line 378 
     }     }
  
     /// CIMMethod print     /// CIMMethod print
     void print() const      void print(std::ostream &o=std::cout) const
     {     {
         _checkRep();         _checkRep();
         _rep->print();          _rep->print(o);
     }     }
  
     /** CIMMethod identical -  Compares with another class     /** CIMMethod identical -  Compares with another class
Line 407 
Line 389 
         @parm Class object for the class to be compared         @parm 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:     /// CIMMethod clone - ATTN:
     CIMClass clone() const     CIMClass clone() const
Line 434 
Line 416 
     }     }
  
     CIMClassRep* _rep;     CIMClassRep* _rep;
     friend class ConstCIMClass;      friend class CIMConstClass;
 }; };
  
 /** ConstCIMClass  /** 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)      CIMConstClass& operator=(const CIMConstClass& x)
     {     {
         if (x._rep != _rep)         if (x._rep != _rep)
         {         {
Line 470 
Line 452 
         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 464 
  
     // Throws IllegalName if className argument not legal CIM identifier.     // Throws IllegalName if className argument not legal CIM identifier.
  
     ConstCIMClass(      CIMConstClass(
         const String& className,         const String& className,
         const String& superClassName = String())         const String& superClassName = String())
     {     {
         _rep = new CIMClassRep(className, superClassName);         _rep = new CIMClassRep(className, superClassName);
     }     }
  
     ~ConstCIMClass()      ~CIMConstClass()
     {     {
         Dec(_rep);         Dec(_rep);
     }     }
Line 542 
Line 524 
         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 562 
         _rep->toXml(out);         _rep->toXml(out);
     }     }
  
     void print() const      void print(std::ostream &o=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 621 
Line 603 
  
 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.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2