CSCI3081W Drone Delivery System
|
Base class decorator for Package that implements IEntityDecorator Package template, delegates all work to wrapped Package class. More...
#include <PackageDecorator.h>
Public Member Functions | |
PackageDecorator (Package *p) | |
Constructor for PackageDecorator, calls IEntityDecorator constructor. More... | |
virtual Vector3 | getDestination () const |
Gets the Package's destination. More... | |
virtual std::string | getStrategyName () const |
Returns the name of the strategy for this package. More... | |
virtual Robot * | getOwner () const |
Returns the owner of the package. More... | |
virtual bool | requiresDelivery () const |
Returns whether or not the package needs to be delivered. More... | |
virtual void | setStrategyName (std::string strategyName_) |
Set the Strategy Name. More... | |
virtual void | initDelivery (Robot *owner) |
Sets the attributes for delivery. More... | |
virtual void | handOff () |
Gives the robot/owner this package. | |
Public Member Functions inherited from IEntityDecorator< Package > | |
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... | |
virtual void | update (double dt) |
Updates the entity's position in the physical system. More... | |
virtual SimulationModel * | getModel () const |
Additional Inherited Members | |
Protected Attributes inherited from IEntityDecorator< Package > | |
T * | sub |
Base class decorator for Package that implements IEntityDecorator Package template, delegates all work to wrapped Package class.
|
inline |
Constructor for PackageDecorator, calls IEntityDecorator constructor.
p | The pointer to the package object to be wrapped |
|
inlinevirtual |
|
inlinevirtual |
Returns the owner of the package.
|
inlinevirtual |
Returns the name of the strategy for this package.
|
inlinevirtual |
Sets the attributes for delivery.
owner | Robot for the package to be delivered to |
|
inlinevirtual |
Returns whether or not the package needs to be delivered.
|
inlinevirtual |
Set the Strategy Name.
strategyName_ | Strategy name |