PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/TGame/TCommon/Entity/EntityVisitorIf.h

http://awoe.googlecode.com/
C++ Header | 52 lines | 24 code | 11 blank | 17 comment | 0 complexity | dec0f341405b4db54680cb8c5cff6b3c MD5 | raw file
 1#ifndef		__ENTITY_Visitor_INTERFACE__
 2#define		__ENTITY_Visitor_INTERFACE__
 3
 4#include "Entry/LibExportCom.h"
 5
 6class EntityP;
 7class EntityM;
 8class EntityD;
 9class EntityP;
10class EntityN;
11class EntityS;
12class EntityR;
13class EntityImp;
14
15//
16//	Entity Visitor Interface
17//	For iterating all entities in the entity container or manage with a for each interface.
18//
19class TCOM_API  IEntityVisitor
20{
21public:
22	virtual	~IEntityVisitor()	{}
23
24	//
25	//	visit player entity
26	virtual bool visitP(EntityP& e)	= 0;
27
28	//
29	//	visit role entity
30	virtual bool visitR(EntityR& e)	= 0;
31
32	//	
33	//	visit monster entity
34	virtual bool visitM(EntityM& e) = 0;
35
36	//
37	//	visit destructible entity
38	virtual bool visitD(EntityD& e) = 0;
39
40	//
41	//	visit static entity
42	virtual bool visitS(EntityS& e) = 0;
43
44	//
45	//	visit NPC entity
46	virtual bool visitN(EntityN& e) = 0;
47
48	//	visit other entity
49	virtual bool visit(EntityImp& e) = 0;
50};
51
52#endif