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