示例#1
0
AAFRESULT STDMETHODCALLTYPE
    ImplAAFOperationDef::GetDegradeToOperations (
      ImplEnumAAFOperationDefs  **ppEnum)
{
	if (NULL == ppEnum)
		return AAFRESULT_NULL_PARAM;
	*ppEnum = 0;
	
	ImplEnumAAFOperationDefs *theEnum = (ImplEnumAAFOperationDefs *)CreateImpl (CLSID_EnumAAFOperationDefs);
	
	XPROTECT()
	{
		OMWeakReferenceVectorIterator<OMUniqueObjectIdentification, ImplAAFOperationDef>* iter = 
			new OMWeakReferenceVectorIterator<OMUniqueObjectIdentification, ImplAAFOperationDef>(_degradeTo);
		if(iter == 0)
			RAISE(AAFRESULT_NOMEMORY);
		CHECK(theEnum->Initialize(&CLSID_EnumAAFOperationDefs, this, iter));
		*ppEnum = theEnum;
	}
	XEXCEPT
	{
		if (theEnum)
		  {
			theEnum->ReleaseReference();
			theEnum = 0;
		  }
	}
	XEND;
	
	return(AAFRESULT_SUCCESS);
}