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

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

#include <PackageDecorator.h>

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

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 RobotgetOwner () 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 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...
 
virtual void update (double dt)
 Updates the entity's position in the physical system. More...
 
virtual SimulationModelgetModel () const
 

Additional Inherited Members

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

Detailed Description

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

Constructor & Destructor Documentation

◆ PackageDecorator()

PackageDecorator::PackageDecorator ( Package p)
inline

Constructor for PackageDecorator, calls IEntityDecorator constructor.

Parameters
pThe pointer to the package object to be wrapped

Member Function Documentation

◆ getDestination()

virtual Vector3 PackageDecorator::getDestination ( ) const
inlinevirtual

Gets the Package's destination.

Returns
The Package's destination

◆ getOwner()

virtual Robot* PackageDecorator::getOwner ( ) const
inlinevirtual

Returns the owner of the package.

Returns
pointer to Robot owning the package

◆ getStrategyName()

virtual std::string PackageDecorator::getStrategyName ( ) const
inlinevirtual

Returns the name of the strategy for this package.

Returns
String name of strategy

◆ initDelivery()

virtual void PackageDecorator::initDelivery ( Robot owner)
inlinevirtual

Sets the attributes for delivery.

Parameters
ownerRobot for the package to be delivered to

◆ requiresDelivery()

virtual bool PackageDecorator::requiresDelivery ( ) const
inlinevirtual

Returns whether or not the package needs to be delivered.

Returns
boolean value of the above statement

◆ setStrategyName()

virtual void PackageDecorator::setStrategyName ( std::string  strategyName_)
inlinevirtual

Set the Strategy Name.

Parameters
strategyName_Strategy name

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