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

Defines a customer. More...

Inheritance diagram for gem::vrp::Customer:
Collaboration diagram for gem::vrp::Customer:

Public Member Functions

 Customer ()=default
 Default constructor.
 Customer (const Coordinates &coordinates)
 Constructs a Customer object with the specified coordinates.
 Customer (const Customer &)=default
 Copy constructor. Creates a copy of an existing Customer object.
 Customer (Customer &&) noexcept=default
 Move constructor. Moves an existing Customer object to a new instance.
Customeroperator= (const Customer &)=default
 Copy assignment operator.
Customeroperator= (Customer &&) noexcept=default
 Move assignment operator.
bool operator== (Customer const &customer) const
 Equality comparison operator.
bool operator!= (Customer const &customer) const
 Inequality comparison operator.
LargeInteger getId () const noexcept
 Retrieves the unique identifier of the customer.
const CoordinatesRef getCoordinates () const noexcept
 Retrieves the geographical coordinates of the customer.
CoordinatesRef getCoordinates ()
 Provides direct access to modify the coordinates attached to this customer.
CustomersetCoordinates (const Coordinates &coords) noexcept
 Sets the geographical coordinates of the customer.
const StringRef getAlias () const noexcept
 Retrieves the alias of the customer.
CustomersetAlias (const String &alias) noexcept
 Sets the alias of the customer.
const StringRef getFirstName () const noexcept
 Retrieves the first name of the customer.
CustomersetFirstName (const String &firstName) noexcept
 Sets the first name of the customer.
const StringRef getLastName () const noexcept
 Retrieves the last name of the customer.
CustomersetLastName (const String &lastName) noexcept
 Sets the last name of the customer.
const AddressInfoRef getAddress () const noexcept
 Retrieves the address of the customer.
CustomersetAddress (const AddressInfo &address) noexcept
 Sets the address of the customer.
const StringRef getEmail () const noexcept
 Retrieves the email of the customer.
CustomersetEmail (const String &email) noexcept
 Sets the email of the customer.
const StringRef getPhoneNumber () const noexcept
 Retrieves the phone number of the customer.
CustomersetPhoneNumber (const String &phoneNumber) noexcept
 Sets the phone number of the customer.
const CustomDataListRef getCustomData () const noexcept
 Retrieves the custom data associated with the customer.
CustomersetCustomData (const CustomDataList &list) noexcept
 Sets the custom data for the customer.

Detailed Description

Defines a customer.

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

Constructor & Destructor Documentation

◆ Customer() [1/2]

gem::vrp::Customer::Customer ( )
default

Default constructor.

Initializes a new instance of the Customer class.

◆ Customer() [2/2]

gem::vrp::Customer::Customer ( const Coordinates & coordinates)
inline

Constructs a Customer object with the specified coordinates.

Parameters
coordinatesThe geographic coordinates of the customer.

Member Function Documentation

◆ getAddress()

const AddressInfoRef gem::vrp::Customer::getAddress ( ) const
inlinenoexcept

Retrieves the address of the customer.

Returns
An AddressInfoRef representing the address of the customer.

◆ getAlias()

const StringRef gem::vrp::Customer::getAlias ( ) const
inlinenoexcept

Retrieves the alias of the customer.

An alias is an alternative name for the customer, which can be used for identification or other purposes.

Returns
A StringRef representing the alias of the customer.

◆ getCoordinates() [1/2]

CoordinatesRef gem::vrp::Customer::getCoordinates ( )
inline

Provides direct access to modify the coordinates attached to this customer.

Returns
A reference to the Coordinates object representing the customer's location, allowing modifications.

◆ getCoordinates() [2/2]

const CoordinatesRef gem::vrp::Customer::getCoordinates ( ) const
inlinenoexcept

Retrieves the geographical coordinates of the customer.

Returns
A constant reference to the Coordinates object representing the customer's location.

◆ getCustomData()

const CustomDataListRef gem::vrp::Customer::getCustomData ( ) const
inlinenoexcept

Retrieves the custom data associated with the customer.

Custom data allows for storing additional information about the customer that does not fit into the standard fields.

Returns
A CustomDataListRef representing the list of custom data items associated with the customer.

◆ getEmail()

const StringRef gem::vrp::Customer::getEmail ( ) const
inlinenoexcept

Retrieves the email of the customer.

Returns
A StringRef representing the email of the customer.

◆ getFirstName()

const StringRef gem::vrp::Customer::getFirstName ( ) const
inlinenoexcept

Retrieves the first name of the customer.

Returns
A StringRef representing the first name of the customer.

◆ getId()

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

Retrieves the unique identifier of the customer.

Returns
A LargeInteger representing the unique identifier of the customer, used for update and delete operations.
See also
Service::updateCustomer(), Service::deleteCustomer()

◆ getLastName()

const StringRef gem::vrp::Customer::getLastName ( ) const
inlinenoexcept

Retrieves the last name of the customer.

Returns
A StringRef representing the last name of the customer.

◆ getPhoneNumber()

const StringRef gem::vrp::Customer::getPhoneNumber ( ) const
inlinenoexcept

Retrieves the phone number of the customer.

Returns
A StringRef representing the phone number of the customer.

◆ operator!=()

bool gem::vrp::Customer::operator!= ( Customer const & customer) const
inline

Inequality comparison operator.

Checks if two Customer objects are not equal.

Parameters
customerAnother Customer object to compare against.
Returns
True if both Customer objects are not equal, otherwise false.

◆ operator=() [1/2]

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

Copy assignment operator.

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

Returns
A reference to this updated object.

◆ operator=() [2/2]

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

Move assignment operator.

Replaces the contents of this object by moving another Customer object into this one.

Returns
A reference to this updated object.

◆ operator==()

bool gem::vrp::Customer::operator== ( Customer const & customer) const
inline

Equality comparison operator.

Checks if two Customer objects are equal.

Parameters
customerAnother Customer object to compare against.
Returns
True if both Customer objects are equal, otherwise false.

◆ setAddress()

Customer & gem::vrp::Customer::setAddress ( const AddressInfo & address)
inlinenoexcept

Sets the address of the customer.

Parameters
addressAn AddressInfo object representing the new address for the customer.
Returns
A reference to this Customer object after the modification.

◆ setAlias()

Customer & gem::vrp::Customer::setAlias ( const String & alias)
inlinenoexcept

Sets the alias of the customer.

Parameters
aliasA string value representing the new alias for the customer.
Returns
A reference to this Customer object after the modification.

◆ setCoordinates()

Customer & gem::vrp::Customer::setCoordinates ( const Coordinates & coords)
inlinenoexcept

Sets the geographical coordinates of the customer.

Note: Coordinates can only be set during the creation of the customer and cannot be updated later.

Parameters
coordsThe new geographical coordinates for the customer.
Returns
A reference to this Customer object after the modification.

◆ setCustomData()

Customer & gem::vrp::Customer::setCustomData ( const CustomDataList & list)
inlinenoexcept

Sets the custom data for the customer.

This method allows for adding additional information about the customer in the form of custom data items.

Parameters
listA CustomDataList containing the new custom data items to be associated with the customer.
Returns
A reference to this Customer object after the modification.

◆ setEmail()

Customer & gem::vrp::Customer::setEmail ( const String & email)
inlinenoexcept

Sets the email of the customer.

Parameters
emailA string value representing the new email for the customer.
Returns
A reference to this Customer object after the modification.

◆ setFirstName()

Customer & gem::vrp::Customer::setFirstName ( const String & firstName)
inlinenoexcept

Sets the first name of the customer.

Parameters
firstNameA string value representing the new first name for the customer.
Returns
A reference to this Customer object after the modification.

◆ setLastName()

Customer & gem::vrp::Customer::setLastName ( const String & lastName)
inlinenoexcept

Sets the last name of the customer.

Parameters
lastNameA string value representing the new last name for the customer.
Returns
A reference to this Customer object after the modification.

◆ setPhoneNumber()

Customer & gem::vrp::Customer::setPhoneNumber ( const String & phoneNumber)
inlinenoexcept

Sets the phone number of the customer.

Parameters
phoneNumberA string value representing the new phone number for the customer.
Returns
A reference to this Customer object after the modification.