version 1.57, 2003/07/31 14:24:33
|
version 1.64, 2004/10/17 20:39:16
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%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 |
|
|
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; |
|
|
| |
} | } |
| |
|
// 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: |
| |
|
|
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) |
|
|
// _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: |