From: Alexey K. <akh...@us...> - 2007-02-23 23:58:45
|
Update of /cvsroot/aaf/AAF/ref-impl/src/OM In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv11309 Modified Files: OMXMLStoredObject.cpp Log Message: Update save() for single weak reference to be similar to those for collections of weak references. Use 'guid' keyword for all types of identification. Index: OMXMLStoredObject.cpp =================================================================== RCS file: /cvsroot/aaf/AAF/ref-impl/src/OM/OMXMLStoredObject.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** OMXMLStoredObject.cpp 23 Feb 2007 23:53:00 -0000 1.42 --- OMXMLStoredObject.cpp 23 Feb 2007 23:58:42 -0000 1.43 *************** *** 545,565 **** _stream << indent; _stream << beginl; // The following ought to be done via the key type and not // via the key size const OMKeySize keySize = singleton.keySize(); if (keySize == sizeof(OMUniqueObjectIdentification) ) { ! const OMUniqueObjectIdentification k = ! *reinterpret_cast<const OMUniqueObjectIdentification*>( ! singleton.identificationBits()); ! _stream << "<identification guid=\"" << k << "\"/>" << endl; } else if (keySize == sizeof(OMUniqueMaterialIdentification) ) { ! const OMUniqueMaterialIdentification k = ! *reinterpret_cast<const OMUniqueMaterialIdentification*>( ! singleton.identificationBits()); ! // Alexey - is 'identification guid' applicable here? ! _stream << "<identification guid=\"" << k << "\"/>" << endl; } else { ! ASSERT("Unimplemented code not reached", false); } _stream << outdent; --- 545,566 ---- _stream << indent; _stream << beginl; + _stream << "<identification guid=\""; // Alexey - is 'identification guid' + // applicable to all types if IDs? // The following ought to be done via the key type and not // via the key size const OMKeySize keySize = singleton.keySize(); + const void* key = singleton.identificationBits(); if (keySize == sizeof(OMUniqueObjectIdentification) ) { ! const OMUniqueObjectIdentification* id = ! reinterpret_cast<const OMUniqueObjectIdentification*>(key); ! _stream << *id; } else if (keySize == sizeof(OMUniqueMaterialIdentification) ) { ! const OMUniqueMaterialIdentification* id = ! reinterpret_cast<const OMUniqueMaterialIdentification*>(key); ! _stream << *id; } else { ! _stream << OMConstant<OMUniqueObjectIdentification>::null; } + _stream << "\"/>" << endl; _stream << outdent; |