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

Represents a Recharge Drone in a physical system. More...

#include <RechargeDrone.h>

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

Public Member Functions

 RechargeDrone (const JsonObject &obj)
 Construct a new Recharge Drone object. More...
 
 ~RechargeDrone ()
 Destroy the Recharge Drone object.
 
void getNextDeadDrone ()
 Get the Next Dead Drone object.
 
void update (double dt)
 Updates recharge drone's position and state. More...
 
 RechargeDrone (const RechargeDrone &drone)=delete
 Removing copy constructor so that the recharge drone cannot be copied.
 
RechargeDroneoperator= (const RechargeDrone &drone)=delete
 Removing assignment operator so that the recharge drone cannot be copied.
 
- Public Member Functions inherited from IEntity
 IEntity ()
 Constructor that assigns a unique ID to the entity.
 
 IEntity (const JsonObject &details)
 Constructor with JsonObject details to define the entity. More...
 
virtual ~IEntity ()
 Virtual destructor for IEntity.
 
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 SimulationModelgetModel () const
 
- Public Member Functions inherited from IPublisher
void addObserver (const IObserver *o)
 adds an observer to the simulation More...
 
void removeObserver (const IObserver *o)
 removes an observer in the simulation More...
 
void notifyObservers (const std::string &message) const
 notifies all observers with a specific message More...
 

Additional Inherited Members

- Protected Attributes inherited from IEntity
SimulationModelmodel = nullptr
 
int id = -1
 
JsonObject details
 
Vector3 position
 
Vector3 direction
 
std::string color
 
std::string name
 
double speed = 0
 

Detailed Description

Represents a Recharge Drone in a physical system.

Constructor & Destructor Documentation

◆ RechargeDrone()

RechargeDrone::RechargeDrone ( const JsonObject obj)

Construct a new Recharge Drone object.

Parameters
objJSON object containing the recharge drone's information

Member Function Documentation

◆ update()

void RechargeDrone::update ( double  dt)
virtual

Updates recharge drone's position and state.

Parameters
dtDelta time

Implements IEntity.


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