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

Diff for /pegasus/src/Pegasus/Common/CIMObjectPath.cpp between version 1.8 and 1.9

version 1.8, 2002/07/30 22:03:00 version 1.9, 2002/07/31 15:45:25
Line 24 
Line 24 
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
   //              Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 222 
Line 224 
     _rep->_type = type;     _rep->_type = type;
 } }
  
 const char* KeyBinding::typeToString(KeyBinding::Type type)  
 {  
     switch (type)  
     {  
         case KeyBinding::BOOLEAN:  
             return "boolean";  
   
         case KeyBinding::STRING:  
             return "string";  
   
         case KeyBinding::NUMERIC:  
             return "numeric";  
   
         case KeyBinding::REFERENCE:  
         default:  
             PEGASUS_ASSERT(false);  
     }  
   
     return "unknown";  
 }  
   
 Boolean operator==(const KeyBinding& x, const KeyBinding& y) Boolean operator==(const KeyBinding& x, const KeyBinding& y)
 { {
     return     return
Line 327 
Line 308 
     _rep = new CIMObjectPathRep(*tmpRef._rep);     _rep = new CIMObjectPathRep(*tmpRef._rep);
 } }
  
 CIMObjectPath::CIMObjectPath(const char* objectName)  
 {  
     // Test the objectName out to see if we get an exception  
     CIMObjectPath tmpRef;  
     tmpRef.set(objectName);  
   
     _rep = new CIMObjectPathRep(*tmpRef._rep);  
 }  
   
 CIMObjectPath::CIMObjectPath( CIMObjectPath::CIMObjectPath(
     const String& host,     const String& host,
     const CIMNamespaceName& nameSpace,     const CIMNamespaceName& nameSpace,
Line 383 
Line 355 
 Boolean CIMObjectPath::_parseHostElement( Boolean CIMObjectPath::_parseHostElement(
     const String& objectName,     const String& objectName,
     char*& p,     char*& p,
     String& host) throw(IllformedObjectName)      String& host)
 { {
     // See if there is a host name (true if it begins with "//"):     // See if there is a host name (true if it begins with "//"):
     // Host is of the from <hostname>-<port> and begins with "//"     // Host is of the from <hostname>-<port> and begins with "//"
Line 541 
Line 513 
 void CIMObjectPath::_parseKeyBindingPairs( void CIMObjectPath::_parseKeyBindingPairs(
     const String& objectName,     const String& objectName,
     char*& p,     char*& p,
     Array<KeyBinding>& keyBindings)  throw(IllformedObjectName)      Array<KeyBinding>& keyBindings)
 { {
     // Get the key-value pairs:     // Get the key-value pairs:
  
Line 679 
Line 651 
     _BubbleSort(keyBindings);     _BubbleSort(keyBindings);
 } }
  
 void CIMObjectPath::set(const String& objectName)  throw(IllformedObjectName)  void CIMObjectPath::set(const String& objectName)
 { {
     clear();     clear();
  
Line 743 
Line 715 
     return *this;     return *this;
 } }
  
 CIMObjectPath& CIMObjectPath::operator=(const char* objectName)  
 {  
     set(objectName);  
     return *this;  
 }  
   
 const String& CIMObjectPath::getHost() const const String& CIMObjectPath::getHost() const
 { {
     return _rep->_host;     return _rep->_host;
Line 815 
Line 781 
  
     objectName.append(getClassName());     objectName.append(getClassName());
  
     if (isInstanceName())      //
       //  ATTN-CAKG-P2-20020726:  The following condition does not correctly
       //  distinguish instanceNames from classNames in every case
       //  The instanceName of a singleton instance of a keyless class has no
       //  key bindings
       //
       if (_rep->_keyBindings.size () != 0)
     {     {
         objectName.append('.');         objectName.append('.');
  
Line 872 
Line 844 
     return ref.toString(includeHost);     return ref.toString(includeHost);
 } }
  
 CIMObjectPath CIMObjectPath::clone() const  
 {  
     return CIMObjectPath(*this);  
 }  
   
 Boolean CIMObjectPath::identical(const CIMObjectPath& x) const Boolean CIMObjectPath::identical(const CIMObjectPath& x) const
 { {
     return     return
Line 891 
Line 858 
     return HashFunc<String>::hash(toStringCanonical());     return HashFunc<String>::hash(toStringCanonical());
 } }
  
 Boolean CIMObjectPath::isInstanceName() const  
 {  
     return _rep->_keyBindings.size() != 0;  
 }  
   
 KeyBindingArray CIMObjectPath::getKeyBindingArray()  
 {  
     return KeyBindingArray();  
 }  
   
   
 Boolean operator==(const CIMObjectPath& x, const CIMObjectPath& y) Boolean operator==(const CIMObjectPath& x, const CIMObjectPath& y)
 { {
     return x.identical(y);     return x.identical(y);


Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2