CSCI3081W Drone Delivery System
Public Member Functions | List of all members
CompositeFactory Class Reference

Factory method for composite class. Inherits from IEntityFactory. More...

#include <CompositeFactory.h>

Inheritance diagram for CompositeFactory:
Inheritance graph
[legend]
Collaboration diagram for CompositeFactory:
Collaboration graph
[legend]

Public Member Functions

IEntitycreateEntity (const JsonObject &entity)
 Creates entity using the given JSON object, if possible. More...
 
void addFactory (IEntityFactory *factoryEntity)
 Adds given factory. More...
 
virtual ~CompositeFactory ()
 Destructor for CompositeFactory class.
 
- Public Member Functions inherited from IEntityFactory
virtual ~IEntityFactory ()
 Destructor for IEntityFactory class.
 

Detailed Description

Factory method for composite class. Inherits from IEntityFactory.

Member Function Documentation

◆ addFactory()

void CompositeFactory::addFactory ( IEntityFactory factoryEntity)

Adds given factory.

Parameters
factoryEntity- Factory to be added.

◆ createEntity()

IEntity* CompositeFactory::createEntity ( const JsonObject entity)
virtual

Creates entity using the given JSON object, if possible.

Parameters
entity- JsonObject to be used to create the new entity.
Returns
Entity that was created if it was created successfully, or a nullpointer if creation failed.

Implements IEntityFactory.


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