CSCI 3081 - Drone Delivery System
Public Member Functions | List of all members
csci3081::IDeliverySystem Class Referenceabstract

The abstract facade of a drone delivery subsystem. More...

#include <delivery_system.h>

Inheritance diagram for csci3081::IDeliverySystem:
Inheritance graph

Public Member Functions

virtual ~IDeliverySystem ()
 Destructor.
 
virtual void RunScript (const picojson::array &script, IEntitySystem *system) const =0
 Translates a set of JSON commands into method calls for the drone delivery system. More...
 
virtual IEntityCreateEntity (const picojson::object &val)=0
 Creates an entity based on a JSON object passed in. More...
 
virtual void AddFactory (IEntityFactory *factory)=0
 Adds an entity factory to a composite factory for creating new entities.
 
virtual void AddEntity (IEntity *entity)=0
 Adds an entity to an entity vector member. Once added, entities can be affected by the system.
 
virtual void SetGraph (const IGraph *graph)=0
 Adds the graph used for dynamic routing in the delivery system.
 
virtual void ScheduleDelivery (IEntity *package, IEntity *dest)=0
 Schedule a drone delivery for a package to be delivered to a customer. More...
 
virtual void AddObserver (IEntityObserver *observer)=0
 Add an observer to a specific entity.
 
virtual void RemoveObserver (IEntityObserver *observer)=0
 Remove an observer from a specific entity.
 
virtual const std::vector< IEntity * > & GetEntities () const =0
 Returns all the entities that are added to the drone system.
 
virtual void Update (float dt)=0
 Updates the drone system time by dt.
 
- Public Member Functions inherited from entity_project::IEntitySystem
virtual ~IEntitySystem ()
 Destructor.
 

Detailed Description

The abstract facade of a drone delivery subsystem.

USAGE: this class is meant to be inherited by a delivery system class you create. Extend this class to manage the drone delivery subsystem of entities.

Member Function Documentation

◆ CreateEntity()

virtual IEntity* csci3081::IDeliverySystem::CreateEntity ( const picojson::object &  val)
pure virtual

Creates an entity based on a JSON object passed in.

Passes a json object to an entity factory to create that entity. The entity creation should be done by your entity factory.

Essentially, this method represents a factory so that creation is separate from the system itself. This means that entities can be created for use outside the subsystem. It also ensures entities can be created within or outside the system for any reason.

Implemented in csci3081::DeliverySimulation.

◆ RunScript()

virtual void csci3081::IDeliverySystem::RunScript ( const picojson::array &  script,
IEntitySystem system 
) const
pure virtual

Translates a set of JSON commands into method calls for the drone delivery system.

The script will be called by main.cc Override this method only if you would like to control or extend your own script commands.

Implements entity_project::IEntitySystem.

Implemented in csci3081::DeliverySimulation.

◆ ScheduleDelivery()

virtual void csci3081::IDeliverySystem::ScheduleDelivery ( IEntity package,
IEntity dest 
)
pure virtual

Schedule a drone delivery for a package to be delivered to a customer.

Package/Customer details allows extra specifications for package delivery based on the business needs.

Implemented in csci3081::DeliverySimulation.


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