(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.64

version 1.57, 2003/07/31 14:24:33 version 1.64, 2004/10/17 20:39:16
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2004////////////////////////////////////////////////////////////////////////
 // //
 // 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.
 // //
 // 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 92 
Line 96 
     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 119 
  
     }     }
  
       // Reject addition of a reference property without a referenceClassName
   
       if ((x.getType() == CIMTYPE_REFERENCE) &&
           (x.getReferenceClassName().isNull()))
       {
           throw TypeMismatchException();
       }
   
     // Set the class origin:     // Set the class origin:
     // ATTN: put this check in other places:     // ATTN: put this check in other places:
  
Line 248 
Line 259 
                                                 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)
Line 469 
Line 482 
     // _resolved = true;     // _resolved = true;
 } }
  
   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(Array<Sint8>& out) const void CIMClassRep::toXml(Array<Sint8>& out) const
 { {
     // Class opening element:     // Class opening element:


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2