GUInity
Public Member Functions | Static Public Member Functions | List of all members
Factory Class Reference

#include <Factory.hpp>

Inheritance diagram for Factory:
Subject< Factory >

Public Member Functions

 Factory ()
 
 ~Factory ()
 

Static Public Member Functions

static shared_ptr< ActorCreateActor (string name)
 
static void DestroyActor (weak_ptr< Actor > actor)
 
static void CreateReferenceActor (shared_ptr< Actor > realActor)
 
static shared_ptr< ActorCreateEditorActor (string name)
 
static void DeserializeComponents (shared_ptr< Actor > actor, vector< shared_ptr< ComponentDescription >> compDescs)
 
static shared_ptr< ActorDeserializeActor (ActorDescription &desc)
 
- Static Public Member Functions inherited from Subject< Factory >
static void addObserver (shared_ptr< Observer > observer)
 
static void removeObserver (shared_ptr< Observer > observer)
 

Additional Inherited Members

- Static Protected Member Functions inherited from Subject< Factory >
static void notify (ComponentEventType type, shared_ptr< Component > component, bool isEditor)
 
static void notify (ActorEventType type, shared_ptr< Actor > actor, bool isEditor)
 

Detailed Description

Actor Factory

This class is responsible for creating new actors. Actors should not be created by hand, but using the Factory instead. This class also holds the model of each Component for the Prototype Design Pattern.

Constructor & Destructor Documentation

Factory::Factory ( )
inline

Default Constructor

Factory::~Factory ( )
inline

Default Destructory

Member Function Documentation

shared_ptr< Actor > Factory::CreateActor ( string  name)
static

Create a new Actor

shared_ptr< Actor > Factory::CreateEditorActor ( string  name)
static

Create a new Editor Actor, one that lives only in the Editor World

void Factory::CreateReferenceActor ( shared_ptr< Actor realActor)
static

Create reference actor. Every Actor in the Game World has a Reference Actor in the Editor World to allow them to be manipulated

shared_ptr< Actor > Factory::DeserializeActor ( ActorDescription desc)
static

Deserialize an Actor

void Factory::DeserializeComponents ( shared_ptr< Actor actor,
vector< shared_ptr< ComponentDescription >>  compDescs 
)
static

Deserialize a list of Components and attaches them to an Actor

void Factory::DestroyActor ( weak_ptr< Actor actor)
static

Destroys an Actor

Create a new Actor


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