Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::vrp::Vehicle Class Reference

Defines a vehicle. More...

Inheritance diagram for gem::vrp::Vehicle:
Collaboration diagram for gem::vrp::Vehicle:

Public Member Functions

 Vehicle ()=default
 Default constructor.
 Vehicle (const Vehicle &)=default
 Default copy constructor.
 Vehicle (Vehicle &&) noexcept=default
 Default move constructor. noexcept is deduced.
Vehicleoperator= (const Vehicle &)=default
 Default copy assignment operator.
Vehicleoperator= (Vehicle &&) noexcept=default
 Default move assignment operator.
bool operator== (Vehicle const &vehicle) const
 Compares two Vehicle objects for equality.
bool operator!= (Vehicle const &vehicle) const
 Compares two Vehicle objects for inequality.
LargeInteger getId () const noexcept
 Retrieves the unique identifier of the vehicle.
EVehicleType getType () const noexcept
 Retrieves the type of the vehicle.
VehiclesetType (EVehicleType vehicleType) noexcept
 Sets the type of the vehicle.
EVehicleStatus getStatus () const noexcept
 Retrieves the status of the vehicle.
VehiclesetStatus (EVehicleStatus vehicleStatus) noexcept
 Sets the status of the vehicle.
const StringRef getName () const noexcept
 Retrieves the name of the vehicle.
VehiclesetName (const String &name) noexcept
 Sets the name of the vehicle.
const StringRef getManufacturer () const noexcept
 Retrieves the manufacturer of the vehicle.
VehiclesetManufacturer (const String &manufacturer) noexcept
 Sets the manufacturer of the vehicle.
const StringRef getModel () const noexcept
 Retrieves the model of the vehicle.
VehiclesetModel (const String &model) noexcept
 Sets the model of the vehicle.
EFuelType getFuelType () const noexcept
 Retrieves the fuel type of the vehicle.
VehiclesetFuelType (EFuelType fuelType) noexcept
 Sets the fuel type of the vehicle.
const CoordinatesRef getLastPosition () const noexcept
 Retrieves the last known position of the vehicle.
VehiclesetLastPosition (const Coordinates &coords) noexcept
 Sets the last known position of the vehicle.
float getConsumption () const noexcept
 Retrieves the consumption rate of the vehicle.
VehiclesetConsumption (float consumption) noexcept
 Sets the consumption rate of the vehicle.
const StringRef getLicensePlate () const noexcept
 Retrieves the license plate of the vehicle.
VehiclesetLicensePlate (const String &licensePlate) noexcept
 Sets the license plate of the vehicle.
float getBikerWeight () const noexcept
 Retrieves the minimum weight that the vehicle can carry (only for bikes).
VehiclesetBikerWeight (float bikerWeight) noexcept
 Sets the minimum weight that the vehicle can carry (only for bikes).
float getMaxWeight () const noexcept
 Retrieves the maximum weight that the vehicle can carry.
VehiclesetMaxWeight (float maxWeight) noexcept
 Sets the maximum weight that the vehicle can carry.
float getMaxCube () const noexcept
 Retrieves the maximum cubic volume that the vehicle can carry.
VehiclesetMaxCube (float maxCube) noexcept
 Sets the maximum cubic volume that the vehicle can carry.
float getBikePower () const noexcept
 Retrieves the power of the bike in watts (applicable only for electric bikes).
VehiclesetBikePower (float bikePower) noexcept
 Sets the power of the bike in watts (applicable only for electric bikes).
VehiclesetHeight (float height) noexcept
 Sets the height of the vehicle.
float getHeight () const noexcept
 Retrieves the height of the vehicle.
VehiclesetWidth (float width) noexcept
 Sets the width of the vehicle.
float getWidth () const noexcept
 Retrieves the width of the vehicle.
VehiclesetWeight (float weight) noexcept
 Sets the weight of the vehicle.
float getWeight () const noexcept
 Retrieves the weight of the vehicle.
VehiclesetLength (float length) noexcept
 Sets the length of the vehicle.
float getLength () const noexcept
 Retrieves the length of the vehicle.
VehiclesetAxleLoad (float axleLoad) noexcept
 Sets the maximum axle load that the vehicle can carry.
float getAxleLoad () const noexcept
 Retrieves the maximum axle load that the vehicle can carry.
VehiclesetFixedCost (float fixedCost) noexcept
 Sets the fixed cost of the vehicle.
float getFixedCost () const noexcept
 Retrieves the fixed cost of the vehicle.
VehiclesetCostPerHour (float costPerHour) noexcept
 Sets the cost per hour of the vehicle.
float getCostPerHour () const noexcept
 Retrieves the cost per hour of the vehicle.
VehiclesetStartTime (int minutes) noexcept
 Sets the vehicle start time of the working program.
int getStartTime () const noexcept
 Retrieves the vehicle start time of the working program.
VehiclesetEndTime (int minutes) noexcept
 Sets the vehicle end time of the working program.
int getEndTime () const noexcept
 Retrieves the vehicle end time of the working program.
VehiclesetBreaks (const std::vector< VRPAvailableBreak > &breaks) noexcept
 Sets the breaks of the vehicle.
std::vector< VRPAvailableBreakgetBreaks () const noexcept
 Retrieves the breaks of the vehicle.

Detailed Description

Defines a vehicle.

Implements share-read / copy-on-write Api object over IVehicle.

Member Function Documentation

◆ getAxleLoad()

float gem::vrp::Vehicle::getAxleLoad ( ) const
inlinenoexcept

Retrieves the maximum axle load that the vehicle can carry.

Returns
The maximum axle load that the vehicle can carry.

◆ getBikePower()

float gem::vrp::Vehicle::getBikePower ( ) const
inlinenoexcept

Retrieves the power of the bike in watts (applicable only for electric bikes).

Returns
The power of the bike in watts.

◆ getBikerWeight()

float gem::vrp::Vehicle::getBikerWeight ( ) const
inlinenoexcept

Retrieves the minimum weight that the vehicle can carry (only for bikes).

Returns
The minimum weight in kilograms that the vehicle can carry.

◆ getBreaks()

std::vector< VRPAvailableBreak > gem::vrp::Vehicle::getBreaks ( ) const
inlinenoexcept

Retrieves the breaks of the vehicle.

Returns
A vector of VRPAvailableBreak objects representing the breaks of the vehicle.

◆ getConsumption()

float gem::vrp::Vehicle::getConsumption ( ) const
inlinenoexcept

Retrieves the consumption rate of the vehicle.

Returns
The consumption rate (liters per 100 km or kWh per 100 km for electric vehicles).

◆ getCostPerHour()

float gem::vrp::Vehicle::getCostPerHour ( ) const
inlinenoexcept

Retrieves the cost per hour of the vehicle.

Returns
The cost per hour of the vehicle.

◆ getEndTime()

int gem::vrp::Vehicle::getEndTime ( ) const
inlinenoexcept

Retrieves the vehicle end time of the working program.

Returns
The end time of the working program, in minutes from midnight.

◆ getFixedCost()

float gem::vrp::Vehicle::getFixedCost ( ) const
inlinenoexcept

Retrieves the fixed cost of the vehicle.

Returns
The fixed cost of the vehicle.

◆ getFuelType()

EFuelType gem::vrp::Vehicle::getFuelType ( ) const
inlinenoexcept

Retrieves the fuel type of the vehicle.

Returns
The fuel type as an EFuelType enumeration value.

◆ getHeight()

float gem::vrp::Vehicle::getHeight ( ) const
inlinenoexcept

Retrieves the height of the vehicle.

Returns
The height of the vehicle.

◆ getId()

LargeInteger gem::vrp::Vehicle::getId ( ) const
inlinenoexcept

Retrieves the unique identifier of the vehicle.

Returns
The ID of the vehicle, used for update or delete operations.
See also
Service::updateVehicle() Service::deleteVehicle()

◆ getLastPosition()

const CoordinatesRef gem::vrp::Vehicle::getLastPosition ( ) const
inlinenoexcept

Retrieves the last known position of the vehicle.

Returns
The last known coordinates of the vehicle as a CoordinatesRef.

◆ getLength()

float gem::vrp::Vehicle::getLength ( ) const
inlinenoexcept

Retrieves the length of the vehicle.

Returns
The length of the vehicle.

◆ getLicensePlate()

const StringRef gem::vrp::Vehicle::getLicensePlate ( ) const
inlinenoexcept

Retrieves the license plate of the vehicle.

Returns
The license plate as a StringRef.

◆ getManufacturer()

const StringRef gem::vrp::Vehicle::getManufacturer ( ) const
inlinenoexcept

Retrieves the manufacturer of the vehicle.

Returns
The manufacturer of the vehicle as a StringRef.

◆ getMaxCube()

float gem::vrp::Vehicle::getMaxCube ( ) const
inlinenoexcept

Retrieves the maximum cubic volume that the vehicle can carry.

Returns
The maximum cubic volume in cubic meters that the vehicle can carry.

◆ getMaxWeight()

float gem::vrp::Vehicle::getMaxWeight ( ) const
inlinenoexcept

Retrieves the maximum weight that the vehicle can carry.

Returns
The maximum weight in kilograms that the vehicle can carry.

◆ getModel()

const StringRef gem::vrp::Vehicle::getModel ( ) const
inlinenoexcept

Retrieves the model of the vehicle.

Returns
The model of the vehicle as a StringRef.

◆ getName()

const StringRef gem::vrp::Vehicle::getName ( ) const
inlinenoexcept

Retrieves the name of the vehicle.

Returns
The name of the vehicle as a StringRef.

◆ getStartTime()

int gem::vrp::Vehicle::getStartTime ( ) const
inlinenoexcept

Retrieves the vehicle start time of the working program.

Returns
The start time of the working program, in minutes from midnight.

◆ getStatus()

EVehicleStatus gem::vrp::Vehicle::getStatus ( ) const
inlinenoexcept

Retrieves the status of the vehicle.

Returns
The status of the vehicle as an EVehicleStatus enumeration value.

◆ getType()

EVehicleType gem::vrp::Vehicle::getType ( ) const
inlinenoexcept

Retrieves the type of the vehicle.

Returns
The type of the vehicle as an EVehicleType enumeration value.

◆ getWeight()

float gem::vrp::Vehicle::getWeight ( ) const
inlinenoexcept

Retrieves the weight of the vehicle.

Returns
The weight of the vehicle.

◆ getWidth()

float gem::vrp::Vehicle::getWidth ( ) const
inlinenoexcept

Retrieves the width of the vehicle.

Returns
The width of the vehicle.

◆ operator!=()

bool gem::vrp::Vehicle::operator!= ( Vehicle const & vehicle) const
inline

Compares two Vehicle objects for inequality.

Parameters
vehicleThe Vehicle object to compare with.
Returns
True if the Vehicle objects are not equivalent, false otherwise.

◆ operator=() [1/2]

Vehicle & gem::vrp::Vehicle::operator= ( const Vehicle & )
default

Default copy assignment operator.

Replaces the contents of this object with a copy of another Vehicle object.

Returns
A reference to the current object.

◆ operator=() [2/2]

Vehicle & gem::vrp::Vehicle::operator= ( Vehicle && )
defaultnoexcept

Default move assignment operator.

Moves the contents of another Vehicle object into this one.

Returns
A reference to the current object.

◆ operator==()

bool gem::vrp::Vehicle::operator== ( Vehicle const & vehicle) const
inline

Compares two Vehicle objects for equality.

Parameters
vehicleThe Vehicle object to compare with.
Returns
True if both Vehicle objects are equivalent, false otherwise.

◆ setAxleLoad()

Vehicle & gem::vrp::Vehicle::setAxleLoad ( float axleLoad)
inlinenoexcept

Sets the maximum axle load that the vehicle can carry.

Parameters
axleLoadThe new maximum axle load for the vehicle.
Returns
A reference to this Vehicle object.

◆ setBikePower()

Vehicle & gem::vrp::Vehicle::setBikePower ( float bikePower)
inlinenoexcept

Sets the power of the bike in watts (applicable only for electric bikes).

Parameters
bikePowerThe new power in watts for the bike.
Returns
A reference to this Vehicle object.

◆ setBikerWeight()

Vehicle & gem::vrp::Vehicle::setBikerWeight ( float bikerWeight)
inlinenoexcept

Sets the minimum weight that the vehicle can carry (only for bikes).

Parameters
bikerWeightThe new minimum weight in kilograms for the bike.
Returns
A reference to this Vehicle object.

◆ setBreaks()

Vehicle & gem::vrp::Vehicle::setBreaks ( const std::vector< VRPAvailableBreak > & breaks)
inlinenoexcept

Sets the breaks of the vehicle.

Parameters
breaksA vector of VRPAvailableBreak objects representing the breaks of the vehicle.
Returns
A reference to this Vehicle object.

◆ setConsumption()

Vehicle & gem::vrp::Vehicle::setConsumption ( float consumption)
inlinenoexcept

Sets the consumption rate of the vehicle.

Parameters
consumptionThe new consumption rate for the vehicle.
Returns
A reference to this Vehicle object.

◆ setCostPerHour()

Vehicle & gem::vrp::Vehicle::setCostPerHour ( float costPerHour)
inlinenoexcept

Sets the cost per hour of the vehicle.

Parameters
costPerHourThe cost per hour of the vehicle.
Returns
A reference to this Vehicle object.

◆ setEndTime()

Vehicle & gem::vrp::Vehicle::setEndTime ( int minutes)
inlinenoexcept

Sets the vehicle end time of the working program.

Parameters
minutesThe end time of the working program, in minutes from midnight.
Returns
A reference to this Vehicle object.

◆ setFixedCost()

Vehicle & gem::vrp::Vehicle::setFixedCost ( float fixedCost)
inlinenoexcept

Sets the fixed cost of the vehicle.

Parameters
fixedCostThe cost of the vehicle.
Returns
A reference to this Vehicle object.

◆ setFuelType()

Vehicle & gem::vrp::Vehicle::setFuelType ( EFuelType fuelType)
inlinenoexcept

Sets the fuel type of the vehicle.

Parameters
fuelTypeThe fuel type as an EFuelType enumeration value.
Returns
A reference to this Vehicle object.

◆ setHeight()

Vehicle & gem::vrp::Vehicle::setHeight ( float height)
inlinenoexcept

Sets the height of the vehicle.

Parameters
heightThe new height for the vehicle.
Returns
A reference to this Vehicle object.

◆ setLastPosition()

Vehicle & gem::vrp::Vehicle::setLastPosition ( const Coordinates & coords)
inlinenoexcept

Sets the last known position of the vehicle.

Parameters
coordsThe new coordinates for the vehicle.
Returns
A reference to this Vehicle object.

◆ setLength()

Vehicle & gem::vrp::Vehicle::setLength ( float length)
inlinenoexcept

Sets the length of the vehicle.

Parameters
lengthThe new length in meters for the vehicle.
Returns
A reference to this Vehicle object.

◆ setLicensePlate()

Vehicle & gem::vrp::Vehicle::setLicensePlate ( const String & licensePlate)
inlinenoexcept

Sets the license plate of the vehicle.

Parameters
licensePlateThe new license plate for the vehicle.
Returns
A reference to this Vehicle object.

◆ setManufacturer()

Vehicle & gem::vrp::Vehicle::setManufacturer ( const String & manufacturer)
inlinenoexcept

Sets the manufacturer of the vehicle.

Parameters
manufacturerThe manufacturer's name.
Returns
A reference to this Vehicle object.

◆ setMaxCube()

Vehicle & gem::vrp::Vehicle::setMaxCube ( float maxCube)
inlinenoexcept

Sets the maximum cubic volume that the vehicle can carry.

Parameters
maxCubeThe new maximum cubic volume in cubic meters for the vehicle.
Returns
A reference to this Vehicle object.

◆ setMaxWeight()

Vehicle & gem::vrp::Vehicle::setMaxWeight ( float maxWeight)
inlinenoexcept

Sets the maximum weight that the vehicle can carry.

Parameters
maxWeightThe new maximum weight in kilograms for the vehicle.
Returns
A reference to this Vehicle object.

◆ setModel()

Vehicle & gem::vrp::Vehicle::setModel ( const String & model)
inlinenoexcept

Sets the model of the vehicle.

Parameters
modelThe model of the vehicle.
Returns
A reference to this Vehicle object.

◆ setName()

Vehicle & gem::vrp::Vehicle::setName ( const String & name)
inlinenoexcept

Sets the name of the vehicle.

Parameters
nameThe new name for the vehicle.
Returns
A reference to this Vehicle object.

◆ setStartTime()

Vehicle & gem::vrp::Vehicle::setStartTime ( int minutes)
inlinenoexcept

Sets the vehicle start time of the working program.

Parameters
minutesThe start time of the working program, in minutes from midnight.
Returns
A reference to this Vehicle object.

◆ setStatus()

Vehicle & gem::vrp::Vehicle::setStatus ( EVehicleStatus vehicleStatus)
inlinenoexcept

Sets the status of the vehicle.

Parameters
vehicleStatusThe new status for the vehicle as an EVehicleStatus enumeration value.
Returns
A reference to this Vehicle object.

◆ setType()

Vehicle & gem::vrp::Vehicle::setType ( EVehicleType vehicleType)
inlinenoexcept

Sets the type of the vehicle.

Parameters
vehicleTypeThe vehicle type as an EVehicleType enumeration value.
Returns
A reference to this Vehicle object.

◆ setWeight()

Vehicle & gem::vrp::Vehicle::setWeight ( float weight)
inlinenoexcept

Sets the weight of the vehicle.

Parameters
weightThe new weight for the vehicle.
Returns
A reference to this Vehicle object.

◆ setWidth()

Vehicle & gem::vrp::Vehicle::setWidth ( float width)
inlinenoexcept

Sets the width of the vehicle.

Parameters
widthThe new width for the vehicle.
Returns
A reference to this Vehicle object.