Eris  1.4.0
Factory.h
1 #ifndef ERIS_FACTORY_H
2 #define ERIS_FACTORY_H
3 
4 #include <Atlas/Objects/ObjectsFwd.h>
5 
6 namespace Eris {
7 
8 // forward decls
9 class Entity;
10 class View;
11 class TypeInfo;
12 
14 class Factory
15 {
16 public:
17  virtual ~Factory();
19 
22  virtual bool accept(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo* type) = 0;
23 
25  virtual Entity* instantiate(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo* type, View* v) = 0;
26 
30  virtual int priority();
31 };
32 
33 } // of namespace Eris
34 
35 #endif
Factory is used to allow custom entity creation by client libraries.
Definition: Factory.h:14
The representation of an Atlas type (i.e a class or operation definition).
Definition: TypeInfo.h:31
virtual Entity * instantiate(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo *type, View *v)=0
create whatever entity the client desires
View encapsulates the set of entities currently visible to an Avatar, as well as those that have rece...
Definition: View.h:37
virtual bool accept(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo *type)=0
Accept is called by the world to test if this factory can instantiate the specified object...
Every Eris class and type lives inside the Eris namespace; certain utility functions live in the Util...
Definition: Account.cpp:34
Entity is a concrete (instantiable) class representing one game entity.
Definition: Entity.h:58
virtual int priority()
retrieve this factory&#39;s priority level; higher priority factories get first chance to process a recei...
Definition: Factory.cpp:11