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

Base class decorator for Drone that implements IEntityDecorator Drone template, delegates all work to wrapped Drone class. More...

#include <DroneDecorator.h>

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

Public Member Functions

 DroneDecorator (Drone *d)
 Constructor for DroneDecorator, calls IEntityDecorator constructor. More...
 
virtual ~DroneDecorator ()
 Destructor.
 
virtual void getNextDelivery () const
 Gets the next delivery in the scheduler.
 
virtual bool getPickedUp () const
 Gets the pickedUp status of the Drone object.
 
virtual PackagegetPackage () const
 Gets pointer to the Drone's package.
 
virtual IStrategygetFinalStrategy () const
 Returns pointer to toFinalDestination.
 
virtual void setToPackage (IStrategy *s) const
 Sets the Drone's toPackage strategy to a new one. More...
 
virtual void update (double dt)
 Updates the drone's position. More...
 
virtual SimulationModelgetModel () const
 Get the Model object. More...
 
IStrategygetToFinalDestinationStrategy ()
 Get the To Final Destination Strategy object. More...
 
IStrategygetToPackageStrategy ()
 Get the To Package Strategy object. More...
 
- Public Member Functions inherited from IEntityDecorator< Drone >
 IEntityDecorator (T *e)
 Constructor for IEntityDecorator. More...
 
virtual ~IEntityDecorator ()
 Destructor.
 
virtual void linkModel (SimulationModel *model)
 Links this entity to a simulation model, giving it access to the model's public variables and functions. More...
 
virtual int getId () const
 Gets the ID of the entity. More...
 
virtual Vector3 getPosition () const
 Gets the position of the entity. More...
 
virtual Vector3 getDirection () const
 Gets the direction of the entity. More...
 
virtual const JsonObjectgetDetails () const
 Gets the details of the entity. More...
 
virtual std::string getColor () const
 Gets the color of the entity. More...
 
virtual std::string getName () const
 Gets the name of the entity. More...
 
virtual double getSpeed () const
 Gets the speed of the entity. More...
 
virtual void setPosition (Vector3 pos_)
 Sets the position of the entity. More...
 
virtual void setDirection (Vector3 dir_)
 Set the direction of the entity. More...
 
virtual void setColor (std::string col_)
 Sets the color of the entity. More...
 
virtual void rotate (double angle)
 Rotate the entity around y axis. More...
 

Additional Inherited Members

- Protected Attributes inherited from IEntityDecorator< Drone >
T * sub
 

Detailed Description

Base class decorator for Drone that implements IEntityDecorator Drone template, delegates all work to wrapped Drone class.

Constructor & Destructor Documentation

◆ DroneDecorator()

DroneDecorator::DroneDecorator ( Drone d)
inline

Constructor for DroneDecorator, calls IEntityDecorator constructor.

Parameters
dThe pointer to the drone object to be wrapped

Member Function Documentation

◆ getModel()

virtual SimulationModel* DroneDecorator::getModel ( ) const
inlinevirtual

Get the Model object.

Returns
SimulationModel* Simulation model where holds the drones and other entities

Reimplemented from IEntityDecorator< Drone >.

◆ getToFinalDestinationStrategy()

IStrategy* DroneDecorator::getToFinalDestinationStrategy ( )
inline

Get the To Final Destination Strategy object.

Returns
IStrategy* to final destination strategy of the drone

◆ getToPackageStrategy()

IStrategy* DroneDecorator::getToPackageStrategy ( )
inline

Get the To Package Strategy object.

Returns
IStrategy* to package strategy of the drone

◆ setToPackage()

virtual void DroneDecorator::setToPackage ( IStrategy s) const
inlinevirtual

Sets the Drone's toPackage strategy to a new one.

Parameters
sNew strategy for drone to get to package

◆ update()

virtual void DroneDecorator::update ( double  dt)
inlinevirtual

Updates the drone's position.

Parameters
dtDelta time

Reimplemented from IEntityDecorator< Drone >.

Reimplemented in MultiDeliveryDecorator, and DroneBatteryDecorator.


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