eris  1.4.0
A WorldForge client library.
Eris::Factory Class Referenceabstract

Factory is used to allow custom entity creation by client libraries. More...

#include <Factory.h>

Public Member Functions

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. More...
 
virtual std::unique_ptr< ViewEntityinstantiate (const Atlas::Objects::Entity::RootEntity &ge, TypeInfo *type, View &v)=0
 create whatever entity the client desires More...
 
virtual int priority ()
 

Detailed Description

Factory is used to allow custom entity creation by client libraries.

Definition at line 15 of file Factory.h.

Member Function Documentation

◆ accept()

virtual bool Eris::Factory::accept ( const Atlas::Objects::Entity::RootEntity &  ge,
TypeInfo type 
)
pure virtual

Accept is called by the world to test if this factory can instantiate the specified object.

Accept is called when an entity must be constructed; this will be called every time an object is created, so avoid lengthy processing if possible.

◆ instantiate()

virtual std::unique_ptr<ViewEntity> Eris::Factory::instantiate ( const Atlas::Objects::Entity::RootEntity &  ge,
TypeInfo type,
View v 
)
pure virtual

create whatever entity the client desires

◆ priority()

int Eris::Factory::priority ( )
virtual

retrieve this factory's priority level; higher priority factories get first chance to process a received Atlas entity. The default implementation returns one.

Definition at line 11 of file Factory.cpp.


The documentation for this class was generated from the following files: