From: Jeff D. <hey...@us...> - 2006-06-16 21:34:48
|
Update of /cvsroot/aaf/AAF/ref-impl/src/com-api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17152/ref-impl/src/com-api Modified Files: CAAFDataEssenceDescriptor.cpp CAAFDataEssenceDescriptor.h Log Message: DataEssenceDescriptor becomes concrete Index: CAAFDataEssenceDescriptor.cpp =================================================================== RCS file: /cvsroot/aaf/AAF/ref-impl/src/com-api/CAAFDataEssenceDescriptor.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CAAFDataEssenceDescriptor.cpp 24 Mar 2006 18:18:38 -0000 1.1 --- CAAFDataEssenceDescriptor.cpp 16 Jun 2006 21:34:43 -0000 1.2 *************** *** 69,72 **** --- 69,121 ---- HRESULT STDMETHODCALLTYPE + CAAFDataEssenceDescriptor::Initialize () + { + ImplAAFDataEssenceDescriptor * ptr; + ImplAAFRoot * pO; + pO = GetRepObject (); + assert (pO); + ptr = static_cast<ImplAAFDataEssenceDescriptor*> (pO); + assert (ptr); + HRESULT hr; + + try + { + hr = ptr->Initialize(); + } + catch (OMException& e) + { + // OMExceptions should be handled by the impl code. However, if an + // unhandled OMException occurs, control reaches here. We must not + // allow the unhandled exception to reach the client code, so we + // turn it into a failure status code. + // + // If the OMException contains an HRESULT, it is returned to the + // client, if not, AAFRESULT_UNEXPECTED_EXCEPTION is returned. + // + hr = OMExceptionToResult(e, AAFRESULT_UNEXPECTED_EXCEPTION); + } + catch (OMAssertionViolation &) + { + // Control reaches here if there is a programming error in the + // impl code that was detected by an assertion violation. + // We must not allow the assertion to reach the client code so + // here we turn it into a failure status code. + // + hr = AAFRESULT_ASSERTION_VIOLATION; + } + catch (...) + { + // We CANNOT throw an exception out of a COM interface method! + // Return a reasonable exception code. + // + hr = AAFRESULT_UNEXPECTED_EXCEPTION; + } + + return hr; + } + + + + HRESULT STDMETHODCALLTYPE CAAFDataEssenceDescriptor::SetDataEssenceCoding (aafUID_constref dataEssenceCoding) { Index: CAAFDataEssenceDescriptor.h =================================================================== RCS file: /cvsroot/aaf/AAF/ref-impl/src/com-api/CAAFDataEssenceDescriptor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CAAFDataEssenceDescriptor.h 24 Mar 2006 18:18:38 -0000 1.1 --- CAAFDataEssenceDescriptor.h 16 Jun 2006 21:34:43 -0000 1.2 *************** *** 66,69 **** --- 66,95 ---- //*********************************************************** // + // Initialize() + // + // Initializes a newly allocated, empty IAAFDataEssenceDescriptor-supporting + /// object. This method must be called after allocation, and before + /// any other method can be called. + /// + /// Succeeds if: + /// - Initialize() has not yet been called on this object. + /// + /// This method will return the following codes. If more than one of + /// the listed errors is in effect, it will return the first one + /// encountered in the order given below: + /// + /// AAFRESULT_SUCCESS + /// - succeeded. (This is the only code indicating success.) + /// + /// AAFRESULT_ALREADY_INITIALIZED + /// - Initialize() has already been called on this object. + // + STDMETHOD (Initialize) + (); + + + + //*********************************************************** + // // SetDataEssenceCoding() // |