NDEVR
API Documentation
TransitIncidentEntity.h
1#pragma once
2#include "Design/Headers/Model.h"
3#include "Design/Headers/ContactInfo.h"
4namespace NDEVR
5{
14
26
43
45 {
46 public:
66 static constexpr StringView IDNumberMetadataTitle() { return "id_number"; }
69 static constexpr StringView IDTypeMetadataTitle() { return "id_type"; }
72 static constexpr StringView EmailMetadataTitle() { return "email"; }
75 static constexpr StringView PersonTypeMetadataTitle() { return "person_type"; }
79 void updateFirstName(const StringView& name, const void* lock_ptr = nullptr);
83 void updateSurname(const StringView& name, const void* lock_ptr = nullptr);
95 void setIDNumber(const StringView& id_number);
101 void setIDType(const StringView& id_type);
107 void setEmail(const StringView& company_name);
108 protected:
110 void init();
111 };
112
115 {
116 public:
122 TransitIncidentProperty(const Model& model, bool ignore_setup = false);
126 protected:
128 void init();
129 };
130
133 {
134 public:
145 bool isOwnerDriver() const;
148 void setIsOwnerDriver(bool is_owner_driver);
154 static constexpr StringView VehicleMakeMetadataTitle() { return "vehicle_make"; }
157 static constexpr StringView VehicleModelMetadataTitle() { return "vehicle_model"; }
160 static constexpr StringView VehicleYearMetadataTitle() { return "vehicle_year"; }
163 static constexpr StringView LicenceNumberMetadataTitle() { return "license_number"; }
166 static constexpr StringView LicenceStateMetadataTitle() { return "license_state"; }
170 protected:
172 void init();
173 };
174
175
176}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A core class that represents a node on model hierarchy.
Definition Model.h:292
Model()
Default constructor. Creates an uninitialized Model.
Definition Model.h:365
The core String View class for the NDEVR API.
Definition StringView.h:58
TransitIncidentEntity(const Model &model)
Constructs a TransitIncidentEntity from an existing Model.
TransitIncidentEntity()
Default constructor.
void setIncidentType(TransitIncidentEntityType type)
Sets the entity type classification.
TransitIncidentEntityType type() const
Returns the entity type classification.
Represents a person involved in a transit incident.
void updateFirstName(const StringView &name, const void *lock_ptr=nullptr)
Updates the first name of this person.
static constexpr StringView IDTypeMetadataTitle()
Returns the metadata key for the identification type field.
static constexpr StringView EmailMetadataTitle()
Returns the metadata key for the email field.
void setIDType(const StringView &id_type)
Sets the identification type of this person.
Buffer< TelephoneNumber > phoneNumbers() const
Returns the phone numbers associated with this person.
void setEmail(const StringView &company_name)
Sets the email address of this person.
TransitIncidentPerson(const Model &model)
Constructs a TransitIncidentPerson from an existing Model.
TransitIncidentPersonType personType() const
Returns the role type of this person in the incident.
static constexpr StringView PersonTypeMetadataTitle()
Returns the metadata key for the person type field.
Buffer< PhysicalAddressModel > addresses() const
Returns the physical addresses associated with this person.
StringView idType() const
Returns the identification type of this person.
StringView firstName() const
Returns the first name of this person.
void setIDNumber(const StringView &id_number)
Sets the identification number of this person.
StringView surname() const
Returns the surname of this person.
TransitIncidentPerson()
Default constructor.
void updateSurname(const StringView &name, const void *lock_ptr=nullptr)
Updates the surname of this person.
static constexpr StringView IDNumberMetadataTitle()
Returns the metadata key for the identification number field.
void init()
Initializes the person entity with default child models.
StringView idNumber() const
Returns the identification number of this person.
StringView email() const
Returns the email address of this person.
void setPersonType(TransitIncidentPersonType type)
Sets the role type of this person in the incident.
TransitIncidentPerson owner() const
Returns the owner of this property.
void init()
Initializes the property entity with default child models.
TransitIncidentProperty(const Model &model, bool ignore_setup=false)
Constructs a TransitIncidentProperty from an existing Model.
TransitIncidentProperty()
Default constructor.
bool isOwnerDriver() const
Checks whether the owner is also the driver.
static constexpr StringView VehicleMakeMetadataTitle()
Returns the metadata key for the vehicle make field.
static constexpr StringView VehicleModelMetadataTitle()
Returns the metadata key for the vehicle model field.
void init()
Initializes the vehicle entity with default child models.
static constexpr StringView LicenceNumberMetadataTitle()
Returns the metadata key for the licence number field.
Buffer< TransitIncidentPerson > passengers() const
Returns all passengers in this vehicle.
static constexpr StringView VehicleYearMetadataTitle()
Returns the metadata key for the vehicle year field.
static constexpr StringView LicenceStateMetadataTitle()
Returns the metadata key for the licence state field.
TransitIncidentPerson driver() const
Returns the driver of this vehicle.
TransitIncidentVehicle(const Model &model)
Constructs a TransitIncidentVehicle from an existing Model.
void setIsOwnerDriver(bool is_owner_driver)
Sets whether the owner is also the driver.
TransitIncidentVehicle()
Default constructor.
Model passengerRoot() const
Returns the root model containing passenger entries.
The primary namespace for the NDEVR SDK.
@ e_none
No defined value type.
TransitIncidentEntityType
Classifies the type of entity involved in a transit incident.
TransitIncidentPersonType
Classifies the role of a person involved in a transit incident.
@ e_undefined
Role not yet defined.
@ e_employee
A transit employee.
@ e_officer
A responding officer.
@ e_driver
The driver of a vehicle.
@ e_passenger
A passenger in a vehicle.
@ e_owner
The owner of a vehicle or property.
@ e_witness
A witness to the incident.
@ e_pedestrian
A pedestrian involved in the incident.
@ name
The display name of the object.