(file) Return to cimmofSourceConsumer.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Compiler / Attic

Diff for /pegasus/src/Pegasus/Compiler/Attic/cimmofSourceConsumer.cpp between version 1.1.2.7 and 1.1.2.8

version 1.1.2.7, 2007/09/29 20:36:30 version 1.1.2.8, 2007/10/01 00:49:29
Line 1277 
Line 1277 
 } }
  
 void cimmofSourceConsumer::_writeProperty( void cimmofSourceConsumer::_writeProperty(
       const CIMNamespaceName& nameSpace,
     const CIMName& cn,     const CIMName& cn,
     const CIMConstProperty& cp)     const CIMConstProperty& cp)
 { {
       String ns = _makeIdent(nameSpace.getString());
     CIMName pn = cp.getName();     CIMName pn = cp.getName();
     CIMType ct = cp.getType();     CIMType ct = cp.getType();
     CIMValue cv = cp.getValue();     CIMValue cv = cp.getValue();
Line 1344 
Line 1346 
         _outn("    -1,");         _outn("    -1,");
     }     }
  
     // SourceReference.refClass:      // SourceReference.ref:
  
     if (ct == CIMTYPE_REFERENCE)     if (ct == CIMTYPE_REFERENCE)
     {     {
         const CIMName& rcn = cp.getReferenceClassName();         const CIMName& rcn = cp.getReferenceClassName();
         _outn("    /* refClass */");          _outn("    /* refId */");
         _outn("    &_%s,", *Str(rcn));          _outn("    &__%s_%s,", *Str(ns), *Str(rcn));
     }     }
  
     // SourceQualifierDecl.value:     // SourceQualifierDecl.value:
Line 1368 
Line 1370 
 } }
  
 void cimmofSourceConsumer::_writeParameter( void cimmofSourceConsumer::_writeParameter(
       const CIMNamespaceName& nameSpace,
     const CIMName& cn,     const CIMName& cn,
     const CIMName& mn,     const CIMName& mn,
     const CIMConstParameter& cp)     const CIMConstParameter& cp)
 { {
       String ns = _makeIdent(nameSpace.getString());
     CIMName pn = cp.getName();     CIMName pn = cp.getName();
     CIMType ct = cp.getType();     CIMType ct = cp.getType();
  
Line 1432 
Line 1436 
         _outn("    -1,");         _outn("    -1,");
     }     }
  
     // SourceProperty.refClass:      // SourceProperty.ref:
  
     if (ct == CIMTYPE_REFERENCE)     if (ct == CIMTYPE_REFERENCE)
     {     {
         const CIMName& rcn = cp.getReferenceClassName();         const CIMName& rcn = cp.getReferenceClassName();
         _outn("    /* refClass */");          _outn("    /* ref */");
         _outn("    &_%s,", *Str(rcn));          _outn("    &__%s_%s,", *Str(ns), *Str(rcn));
     }     }
  
     // SourceQualifierDecl.value:     // SourceQualifierDecl.value:
Line 1454 
Line 1458 
 } }
  
 void cimmofSourceConsumer::_writeMethod( void cimmofSourceConsumer::_writeMethod(
       const CIMNamespaceName& nameSpace,
     const CIMName& cn,     const CIMName& cn,
     const CIMConstMethod& cm)     const CIMConstMethod& cm)
 { {
Line 1466 
Line 1471 
     for (Uint32 i = 0; i < cm.getParameterCount(); i++)     for (Uint32 i = 0; i < cm.getParameterCount(); i++)
     {     {
         CIMConstParameter cp = cm.getParameter(i);         CIMConstParameter cp = cm.getParameter(i);
         _writeParameter(cn, mn, cp);          _writeParameter(nameSpace, cn, mn, cp);
         parameterNames.append(cp.getName());         parameterNames.append(cp.getName());
     }     }
  
Line 1530 
Line 1535 
 } }
  
 void cimmofSourceConsumer::_writeClass( void cimmofSourceConsumer::_writeClass(
       const CIMNamespaceName& nameSpace,
     const CIMClass& cc)     const CIMClass& cc)
 { {
       String ns = _makeIdent(nameSpace.getString());
     CIMName cn = cc.getClassName();     CIMName cn = cc.getClassName();
  
     // Write comment:     // Write comment:
Line 1546 
Line 1553 
     for (Uint32 i = 0; i < cc.getPropertyCount(); i++)     for (Uint32 i = 0; i < cc.getPropertyCount(); i++)
     {     {
         CIMConstProperty cp = cc.getProperty(i);         CIMConstProperty cp = cc.getProperty(i);
         _writeProperty(cc.getClassName(), cp);          _writeProperty(nameSpace, cc.getClassName(), cp);
         featureNames.append(cp.getName());         featureNames.append(cp.getName());
     }     }
  
Line 1555 
Line 1562 
     for (Uint32 i = 0; i < cc.getMethodCount(); i++)     for (Uint32 i = 0; i < cc.getMethodCount(); i++)
     {     {
         CIMConstMethod cm = cc.getMethod(i);         CIMConstMethod cm = cc.getMethod(i);
         _writeMethod(cc.getClassName(), cm);          _writeMethod(nameSpace, cc.getClassName(), cm);
         featureNames.append(cm.getName());         featureNames.append(cm.getName());
     }     }
  
Line 1577 
Line 1584 
  
     // Class header:     // Class header:
  
     String path = "_" + cn.getString();      String path = "__" + ns + "_" + cn.getString();
  
     _writeQualifierArray(path, _Qualifiers(cc));     _writeQualifierArray(path, _Qualifiers(cc));
  
     _outn("static SourceClass");      _outn("SourceClass");
     _outn("%s =", *Str(path));     _outn("%s =", *Str(path));
     _outn("{");     _outn("{");
  
Line 1612 
Line 1619 
     // SourceClass.super:     // SourceClass.super:
  
     const CIMName& scn = cc.getSuperClassName();     const CIMName& scn = cc.getSuperClassName();
   
     _outn("    /* super */");     _outn("    /* super */");
  
     if (scn.isNull())     if (scn.isNull())
         _outn("    0,");         _outn("    0,");
     else     else
         _outn("    &_%s,", *Str(scn));          _outn("    &__%s_%s,", *Str(ns), *Str(scn));
  
     // SourceClass.features:     // SourceClass.features:
  
Line 1645 
Line 1651 
         _writeQualifierDecl(_qualifiers[i]);         _writeQualifierDecl(_qualifiers[i]);
     }     }
  
       // Forward declare all classes:
   
       _box(_os, "Forward class declarations");
   
       _nl();
   
       for (Uint32 i = 0; i < _classes.size(); i++)
       {
           CIMName cn = _classes[i].getClassName();
           _outn("extern SourceClass __%s_%s;", *Str(ns), *Str(cn));
       }
   
       _nl();
   
     // Write classes:     // Write classes:
  
     for (Uint32 i = 0; i < _classes.size(); i++)     for (Uint32 i = 0; i < _classes.size(); i++)
         _writeClass(_classes[i]);          _writeClass(nameSpace, _classes[i]);
  
     // Write qualifiers list:     // Write qualifiers list:
  
Line 1683 
Line 1703 
  
     for (Uint32 i = 0; i < _classes.size(); i++)     for (Uint32 i = 0; i < _classes.size(); i++)
     {     {
         _outn("&_%s,", *Str(_classes[i].getClassName()));          CIMName cn = _classes[i].getClassName();
           _outn("&__%s_%s,", *Str(ns), *Str(cn));
     }     }
  
     _outn("0,");     _outn("0,");


Legend:
Removed from v.1.1.2.7  
changed lines
  Added in v.1.1.2.8

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2