void CEventDispatcher_Ctor(CEventDispatcher* pMe) { DECLARE_PVTBL(pvt, IEventDispatcher); CBase_Ctor(&pMe->base); pMe->m_pListeners = CVector_New(); IVector_SetPfnFree(pMe->m_pListeners, FREE); VT_FUNC(pvt, CEventDispatcher, Release); VT_FUNC(pvt, CEventDispatcher, AddListener); VT_FUNC(pvt, CEventDispatcher, RemoveListener); VT_FUNC(pvt, CEventDispatcher, Notify); }
/*============================================================================= FUNCTION: IVectorMod_CreateInstance DESCRIPTION: PARAMETERS: *po: *pIShell: ClsId: **ppObj: RETURN VALUE: int: COMMENTS: SIDE EFFECTS: SEE ALSO: =============================================================================*/ static int IVectorMod_CreateInstance(IModule *po, IShell *pIShell, AEECLSID ClsId, void **ppObj) { *ppObj = NULL; if (ClsId != AEECLSID_VECTOR) { return EFAILED; } if (CVector_New(pIShell, po, (IVector**)ppObj) != SUCCESS) { return EFAILED; } return SUCCESS; }