eris  1.4.0
A WorldForge client library.
Factory.h
1 #ifndef ERIS_FACTORY_H
2 #define ERIS_FACTORY_H
3 
4 #include <Atlas/Objects/ObjectsFwd.h>
5 #include "ViewEntity.h"
6 
7 namespace Eris {
8 
9 // forward decls
10 class Entity;
11 class View;
12 class TypeInfo;
13 
15 class Factory
16 {
17 public:
18  virtual ~Factory();
20 
23  virtual bool accept(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo* type) = 0;
24 
26  virtual std::unique_ptr<ViewEntity> instantiate(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo* type, View& v) = 0;
27 
31  virtual int priority();
32 };
33 
34 } // of namespace Eris
35 
36 #endif
Eris::Factory::priority
virtual int priority()
Definition: Factory.cpp:11
Eris::Factory
Factory is used to allow custom entity creation by client libraries.
Definition: Factory.h:15
Eris::Factory::accept
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.
Eris
Definition: Account.cpp:33
Eris::TypeInfo
The representation of an Atlas type (i.e a class or operation definition). This class supports effice...
Definition: TypeInfo.h:32
Eris::Factory::instantiate
virtual std::unique_ptr< ViewEntity > instantiate(const Atlas::Objects::Entity::RootEntity &ge, TypeInfo *type, View &v)=0
create whatever entity the client desires
Eris::View
Definition: View.h:40