CSCI3081W Drone Delivery System
|
Base class decorator for Drone that implements IEntityDecorator Drone template, delegates all work to wrapped Drone class. More...
#include <DroneDecorator.h>
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 Package * | getPackage () const |
Gets pointer to the Drone's package. | |
virtual IStrategy * | getFinalStrategy () 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 SimulationModel * | getModel () const |
Get the Model object. More... | |
IStrategy * | getToFinalDestinationStrategy () |
Get the To Final Destination Strategy object. More... | |
IStrategy * | getToPackageStrategy () |
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 JsonObject & | getDetails () 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 |
Base class decorator for Drone that implements IEntityDecorator Drone template, delegates all work to wrapped Drone class.
|
inline |
Constructor for DroneDecorator, calls IEntityDecorator constructor.
d | The pointer to the drone object to be wrapped |
|
inlinevirtual |
Get the Model object.
Reimplemented from IEntityDecorator< Drone >.
|
inline |
Get the To Final Destination Strategy object.
|
inline |
Get the To Package Strategy object.
|
inlinevirtual |
Sets the Drone's toPackage strategy to a new one.
s | New strategy for drone to get to package |
|
inlinevirtual |
Updates the drone's position.
dt | Delta time |
Reimplemented from IEntityDecorator< Drone >.
Reimplemented in MultiDeliveryDecorator, and DroneBatteryDecorator.