34 Package(
const picojson::object& detail);
Customer * GetOwner()
This returns a customer object of the package object if there is one, return NULL otherwise...
Definition: package.cc:65
A representation of a Customer, inherited from EntityBase It stores the Customer's name...
Definition: customer.h:25
void SetPosition(std::vector< float > agr)
This function uses to set the new position of the package. However, package only moves in simulation ...
Definition: package.cc:69
A representation of a Package, inherited from EntityBase It stores the Package's name, ID, version, position, direction, and dynamic mode.
Definition: package.h:27
bool IsDelivered()
This returns a TRUE if the package has been delivered, FALSE otherwise.
Definition: package.cc:44
void SetOwner(Customer *)
This links a customer object to the package object if the package has not already had a customer...
Definition: package.cc:39
Package(const picojson::object &detail)
Definition: package.cc:9
Definition: asubject.cc:3
void Update(float dt)
This is an inherited method from EntityBase to use for DeliverySimulation. This updates the position ...
Definition: package.cc:103
void Deliver()
This sets the deliverd attribute of the package to true, signaling that the package has already been ...
Definition: package.cc:48
IEntity * GetCarrier()
This returns the pointer that points to the carrier carrying the package if there is one; return NULL...
Definition: package.cc:80
void SetDynamic(bool n)
This changes the dynamic of the drone. Note that for the drone to move on the simulation, dynamic of the drone must be set to true.
Definition: package.cc:61
void SetCarrier(IEntity *)
This links a carrier Entity object (drone, truck, robot, etc) to the package object if the package ha...
Definition: package.cc:76
The base class for creating entities.
Definition: entity_base.h:27
void GetStatus()
Overwritten GetStatus from ASubject. This function creates the arguments required by Notify function ...
Definition: package.cc:84
A movable object in a scene. Entities have position, direction and size.
Definition: entity.h:15
This is the Abstract Subject class from which our subjects will inherit Implements the Observer/subje...
Definition: asubject.h:22