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

Diff for /pegasus/src/Pegasus/Common/CIMClassRep.cpp between version 1.28 and 1.29

version 1.28, 2002/03/24 13:33:07 version 1.29, 2002/03/25 16:27:51
Line 34 
Line 34 
 #include "XmlWriter.h" #include "XmlWriter.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
   PEGASUS_USING_STD;
  
 CIMClassRep::CIMClassRep( CIMClassRep::CIMClassRep(
     const CIMReference& reference,     const CIMReference& reference,
Line 185 
Line 186 
  
     if (_superClassName.size())     if (_superClassName.size())
     {     {
                   //cout << "KSTEST Class Resolve with Super class " << getClassName()
                   //<< " superClass " << _superClassName << endl;
         //----------------------------------------------------------------------         //----------------------------------------------------------------------
         // First check to see if the super-class really exists:                  // First check to see if the super-class really exists and the subclassing legal:
         //----------------------------------------------------------------------         //----------------------------------------------------------------------
         CIMConstClass superClass         CIMConstClass superClass
             = context->lookupClass(nameSpace, _superClassName);             = context->lookupClass(nameSpace, _superClassName);
Line 198 
Line 201 
         if (!superClass._rep->_resolved)         if (!superClass._rep->_resolved)
             throw ClassNotResolved(_superClassName);             throw ClassNotResolved(_superClassName);
 #endif #endif
                   // If subclass is abstract but superclass not, throw CIM Exception
  
                   /* ATTN:KS-24 Mar 2002 P1 - Test this and confirm that rule is correct
                   if isAbstract() && !superclass.isAbstract()
                           throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_SUPERCLASS,_superClassName);
                   */
         //----------------------------------------------------------------------         //----------------------------------------------------------------------
         // Iterate all the properties of *this* class. Resolve each one and         // Iterate all the properties of *this* class. Resolve each one and
         // set the class-origin:         // set the class-origin:
Line 238 
Line 246 
             // the class-origin and propagated flag accordingly.             // the class-origin and propagated flag accordingly.
  
             Uint32 pos = PEG_NOT_FOUND;             Uint32 pos = PEG_NOT_FOUND;
                 /*       ATTN: KS move to simpler                          /*       ATTN: KS move to simpler version of the find
             for (Uint32 j = m, n = _properties.size(); j < n; j++)             for (Uint32 j = m, n = _properties.size(); j < n; j++)
             {             {
                         if (CIMName::equal(_properties[j].getName(),                         if (CIMName::equal(_properties[j].getName(),
Line 264 
Line 272 
             }             }
                 else                 else
                 {                 {
                                   // Property Qualifiers must propagate if allowed
                 // If property exists in the superclass and in the subclass,                 // If property exists in the superclass and in the subclass,
                 // then, enumerate the qualifiers of the superclass's property.                 // then, enumerate the qualifiers of the superclass's property.
                 // If a qualifier is defined on the superclass's property                 // If a qualifier is defined on the superclass's property
Line 277 
Line 286 
                                 CIMQualifier superClassQualifier =                                 CIMQualifier superClassQualifier =
                                                                                 superproperty.getQualifier(i);                                                                                 superproperty.getQualifier(i);
                                 const String name = superClassQualifier.getName();                                 const String name = superClassQualifier.getName();
                                           /* ATTN KS This is replacement find function.
                                           if((Uint32 j = subproperty.findQualifier(q.getName()) == PEG_NOT_FOUND)
                                           {
                                                   subproperty.addQualifier(superClassQualifier);
   
                                           }
                                           */
                                 for (Uint32 j = 0, m = subproperty.getQualifierCount();                                 for (Uint32 j = 0, m = subproperty.getQualifierCount();
                                          j < m;                                          j < m;
                                          j++)                                          j++)
Line 338 
Line 354 
             // the class-origin and propagated flag accordingly.             // the class-origin and propagated flag accordingly.
  
             Uint32 pos = PEG_NOT_FOUND;             Uint32 pos = PEG_NOT_FOUND;
                 /**********************                          /**********************  KS move to simpler version
             for (Uint32 j = m, n = _methods.size(); j < n; j++)             for (Uint32 j = m, n = _methods.size(); j < n; j++)
             {             {
                         if (CIMName::equal(_methods[j].getName(),                         if (CIMName::equal(_methods[j].getName(),
Line 366 
Line 382 
                         method.setPropagated(true);                         method.setPropagated(true);
                         _methods.insert(m++, method);                         _methods.insert(m++, method);
                 }                 }
   
         }         }
  
         //----------------------------------------------------------------------         //----------------------------------------------------------------------
         // Validate the qualifiers of this class:         // Validate the qualifiers of this class:
         //----------------------------------------------------------------------         //----------------------------------------------------------------------
                   //cout << "KSTEST Class Qualifiers resolve for class" << getClassName() << endl;
         _qualifiers.resolve(         _qualifiers.resolve(
             context,             context,
             nameSpace,             nameSpace,
Line 381 
Line 396 
             superClass._rep->_qualifiers,             superClass._rep->_qualifiers,
             true);             true);
     }     }
     else      else        // No SuperClass exsts
     {     {
                 //----------------------------------------------------------------------                 //----------------------------------------------------------------------
                 // Resolve each property:                 // Resolve each property:
                 //----------------------------------------------------------------------                 //----------------------------------------------------------------------
                   //cout << "KSTEST Class Resolve, No Super class " << getClassName() << endl;
  
                 for (Uint32 i = 0, n = _properties.size(); i < n; i++)                 for (Uint32 i = 0, n = _properties.size(); i < n; i++)
                         _properties[i].resolve(context, nameSpace, false, true);                         _properties[i].resolve(context, nameSpace, false, true);
Line 506 
Line 522 
     toXml(tmp);     toXml(tmp);
     tmp.append('\0');     tmp.append('\0');
     XmlWriter::indentedPrint(os, tmp.getData(), 4);     XmlWriter::indentedPrint(os, tmp.getData(), 4);
     // cout << tmp.getData() << endl;  
 } }
  
 void CIMClassRep::printMof(PEGASUS_STD(ostream) &os) const void CIMClassRep::printMof(PEGASUS_STD(ostream) &os) const


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2