(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.57 and 1.69

version 1.57, 2003/07/31 14:24:33 version 1.69, 2005/10/31 17:39:11
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // The Open Group, Tivoli Systems  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 27 
Line 33 
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 //              Carol Ann Krug Graves, Hewlett-Packard Company //              Carol Ann Krug Graves, Hewlett-Packard Company
 //                (carolann_graves@hp.com) //                (carolann_graves@hp.com)
   //              David Dillard, VERITAS Software Corp.
   //                  (david.dillard@veritas.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 92 
Line 100 
     value.get(flag);     value.get(flag);
     return flag;     return flag;
 } }
   
 void CIMClassRep::setSuperClassName(const CIMName& superClassName) void CIMClassRep::setSuperClassName(const CIMName& superClassName)
 { {
     _superClassName = superClassName;     _superClassName = superClassName;
Line 116 
Line 123 
  
     }     }
  
     // Set the class origin:      // Reject addition of a reference property without a referenceClassName
     // ATTN: put this check in other places:  
  
     if (x.getClassOrigin().isNull())      if ((x.getType() == CIMTYPE_REFERENCE) &&
         CIMProperty(x).setClassOrigin(_reference.getClassName());          (x.getReferenceClassName().isNull()))
       {
           throw TypeMismatchException();
       }
  
     // Add the property:     // Add the property:
  
Line 248 
Line 257 
                                                 MessageLoaderParms("Common.CIMClassRep.NON_ASSOCIATION_CLASS_CONTAINS_REFERENCE_PROPERTY",                                                 MessageLoaderParms("Common.CIMClassRep.NON_ASSOCIATION_CLASS_CONTAINS_REFERENCE_PROPERTY",
                                                                                    "Non-assocation class contains reference property"));                                                                                    "Non-assocation class contains reference property"));
  
   
                         }                         }
  
   
                         Uint32 index = superClass.findProperty(property.getName());                         Uint32 index = superClass.findProperty(property.getName());
  
                         if (index == PEG_NOT_FOUND)                         if (index == PEG_NOT_FOUND)
                         {                         {
                             Resolver::resolveProperty (property, context,                             Resolver::resolveProperty (property, context,
                                 nameSpace, false, true);                                 nameSpace, false, true);
                               if (property.getClassOrigin().isNull())
                               {
                                   property.setClassOrigin(getClassName());
                               }
                               property.setPropagated(false);
                         }                         }
                         else                         else
                         {                         {
Line 263 
Line 279 
                                 superClass.getProperty(index);                                 superClass.getProperty(index);
                             Resolver::resolveProperty (property, context,                             Resolver::resolveProperty (property, context,
                                 nameSpace, false, superClassProperty, true);                                 nameSpace, false, superClassProperty, true);
                               if (property.getClassOrigin().isNull())
                               {
                                   property.setClassOrigin(
                                       superClassProperty.getClassOrigin());
                               }
                         }                         }
                 }                 }
  
Line 441 
Line 462 
                 //cout << "KSTEST Class Resolve, No Super class " << getClassName() << endl;                 //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++)
                   {
                     Resolver::resolveProperty (_properties[i], context,                     Resolver::resolveProperty (_properties[i], context,
                         nameSpace, false, true);                         nameSpace, false, true);
                       _properties[i].setClassOrigin(getClassName());
                       _properties[i].setPropagated(false);
                   }
  
                 //----------------------------------------------------------------------                 //----------------------------------------------------------------------
                 // Resolve each method:                 // Resolve each method:
Line 469 
Line 494 
     // _resolved = true;     // _resolved = true;
 } }
  
 void CIMClassRep::toXml(Array<Sint8>& out) const  CIMInstance CIMClassRep::buildInstance(Boolean includeQualifiers,
       Boolean includeClassOrigin,
       const CIMPropertyList& propertyList) const
   {
   
       // Create the new instance
       CIMInstance newInstance(_reference.getClassName());
   
       // Copy qualifiers if required
       if (includeQualifiers)
       {
           for (Uint32 i = 0 ; i < getQualifierCount() ; i++)
           {
               newInstance.addQualifier(getQualifier(i).clone());
           }
       }
   
       // Copy Properties
       for (Uint32 i = 0 ; i < _properties.size() ; i++)
       {
           CIMConstProperty p = getProperty(i);
           CIMName name = p.getName();
           Array<CIMName> pl = propertyList.getPropertyNameArray();
           if (propertyList.isNull() || Contains(pl, name))
           {
               CIMProperty p = getProperty(i).clone();
               if (!includeQualifiers && p.getQualifierCount() != 0)
               {
                   for (Uint32 j = 0 ; j < getQualifierCount() ; j++)
                   {
                       p.removeQualifier(i - 1);
                   }
               }
               if (!includeClassOrigin)
               {
                   p.setClassOrigin(CIMName());
               }
               newInstance.addProperty(p);
   
               // Delete class origin attribute if required
           }
       }
   
       return(newInstance);
   }
   
   void CIMClassRep::toXml(Buffer& out) const
 { {
     // Class opening element:     // Class opening element:
  
Line 512 
Line 583 
  
 */ */
  
 void CIMClassRep::toMof(Array<Sint8>& out) const  void CIMClassRep::toMof(Buffer& out) const
 { {
     // Get and format the class qualifiers     // Get and format the class qualifiers
     out << "\n//    Class " << _reference.getClassName();     out << "\n//    Class " << _reference.getClassName();


Legend:
Removed from v.1.57  
changed lines
  Added in v.1.69

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2