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

Diff for /pegasus/src/Pegasus/Common/CIMScope.cpp between version 1.14 and 1.15

version 1.14, 2002/08/05 16:14:41 version 1.15, 2002/08/14 22:32:23
Line 25 
Line 25 
 // //
 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 //                (carolann_graves@hp.com) //                (carolann_graves@hp.com)
   //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 34 
Line 35 
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 const Uint32 CIMScope::NONE = 0;  const CIMScope CIMScope::NONE = 0;
 const Uint32 CIMScope::CLASS = 1;  const CIMScope CIMScope::CLASS = 1;
 const Uint32 CIMScope::ASSOCIATION = 2;  const CIMScope CIMScope::ASSOCIATION = 2;
 const Uint32 CIMScope::INDICATION = 4;  const CIMScope CIMScope::INDICATION = 4;
 const Uint32 CIMScope::PROPERTY = 8;  const CIMScope CIMScope::PROPERTY = 8;
 const Uint32 CIMScope::REFERENCE = 16;  const CIMScope CIMScope::REFERENCE = 16;
 const Uint32 CIMScope::METHOD = 32;  const CIMScope CIMScope::METHOD = 32;
 const Uint32 CIMScope::PARAMETER = 64;  const CIMScope CIMScope::PARAMETER = 64;
 const Uint32 CIMScope::ANY = (1 | 2 | 4 | 8 | 16 | 32 | 64);  const CIMScope CIMScope::ANY = CIMScope::CLASS + CIMScope::ASSOCIATION +
                                  CIMScope::INDICATION + CIMScope::PROPERTY +
                                  CIMScope::REFERENCE + CIMScope::METHOD +
                                  CIMScope::PARAMETER;
  
 CIMScope::CIMScope () CIMScope::CIMScope ()
     : cimScope (CIMScope::NONE)      : cimScope (CIMScope::NONE.cimScope)
 { {
 } }
  
Line 57 
Line 61 
 CIMScope::CIMScope (const Uint32 scope) CIMScope::CIMScope (const Uint32 scope)
     : cimScope (scope)     : cimScope (scope)
 { {
     if (scope > CIMScope::ANY)      PEGASUS_ASSERT (scope < 128);
     {  
         //  
         //  Invalid scope value  
         //  
         String scopeString;  
         char buffer [32];  
         sprintf (buffer, "%lu", (unsigned long) scope);  
         scopeString = buffer;  
         throw InvalidScope (scopeString);  
     }  
 } }
  
 CIMScope & CIMScope::operator= (const CIMScope & scope) CIMScope & CIMScope::operator= (const CIMScope & scope)
Line 76 
Line 70 
     return *this;     return *this;
 } }
  
 void CIMScope::addScope (const Uint32 scope)  void CIMScope::addScope (const CIMScope & scope)
 {  
     if (scope > CIMScope::ANY)  
     {  
         //  
         //  Invalid scope value  
         //  
         String scopeString;  
         char buffer [32];  
         sprintf (buffer, "%lu", (unsigned long) scope);  
         scopeString = buffer;  
         throw InvalidScope (scopeString);  
     }  
   
     this->cimScope |= scope;  
 }  
   
 Boolean CIMScope::hasScope (const Uint32 scope) const  
 {  
     if ((this->cimScope & scope) == scope)  
     {     {
         return true;      this->cimScope |= scope.cimScope;
     }  
     else  
     {  
         return false;  
     }  
 } }
  
 Boolean CIMScope::hasScope (const CIMScope & scope) const Boolean CIMScope::hasScope (const CIMScope & scope) const
Line 129 
Line 99 
     }     }
 } }
  
   CIMScope CIMScope::operator+ (const CIMScope & scope) const
   {
       return CIMScope(this->cimScope | scope.cimScope);
   }
   
 String CIMScope::toString () const String CIMScope::toString () const
 { {
     String tmp;     String tmp;


Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2