|
// Here's where systems can access other interfaces implemented by this objectbbs.mypm.net
// Returns NULL if it doesn't implement the requested interfacewww.mypm.net
virtual void *QueryInterface( const char *pInterfaceName ) = 0;项目管理者联盟
// Init, shutdown项目管理培训
virtual InitReturnVal_t Init() = 0;项目管理者联盟
virtual void Shutdown() = 0;项目管理者联盟
};bbs.mypm.net
通过Connect方法你可以将两个模块建立一个连接关系,通过QueryInterface方法你可以检索到其他需要暴露接口,这种方法很好的为所有的模块建立一个标准的对外接口,极大的减轻了编程的复杂性,遗憾的是在HL2引擎中只有部分模块使用了这个方法,可能是这个接口引入时间太晚的缘故。pmp.mypm.net
|