4#include <NDEVR/DBFParser.h>
5#include <NDEVR/Dictionary.h>
6#include <NDEVR/INIInterface.h>
The equivelent of std::vector but with a bit more control.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Contains methods for easily reading and writing to an INI file including efficient casting,...
INIInterface()
Constructs an INIInterface with no default INI file.
The core String class for the NDEVR API.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A database of vehicle specifications (make, model, year, dimensions, weight) loaded from DBF files an...
Buffer< fltp08 > curb_weight
Vehicle curb weights, one per record.
VehicleRecord record(uint04 i) const
Returns a record accessor for the given index.
void readFromDBF(const File &f)
Reads vehicle records from a single DBF file.
Buffer< fltp08 > wheel_base
Vehicle wheel bases, one per record.
Buffer< String > getModels(const String &make=String(), uint04 year=Constant< uint04 >::Invalid) const
Returns all unique models, optionally filtered by make and year.
Buffer< VehicleSearchItem > file_search_terms
Search term mappings for associating records to 3D model files.
Buffer< uint04 > filterModels(const String &make, const String &model, uint04 year) const
Returns indices of records matching the given make, model, and year criteria.
bool recordFilterPass(uint04 record_number, const String &make, const String &model, uint04 year) const
Checks whether a specific record passes the given filter criteria.
static uint04 ParseYear(const File &f)
Parses a year value from a file name.
Buffer< String > vehicle_models
Vehicle model names, one per record.
Buffer< String > getMakes(const String &model=String(), uint04 year=Constant< uint04 >::Invalid) const
Returns all unique makes, optionally filtered by model and year.
VehicleDatabase()
Default constructor.
void readSearchTermsFromFolder(const File &folder)
Reads vehicle-to-model search term mappings from INI files in the given folder.
Buffer< uint04 > getYears(const String &make=String(), const String &model=String()) const
Returns all unique years, optionally filtered by make and model.
Buffer< fltp08 > overall_height
Vehicle overall heights, one per record.
static VehicleDatabase & DefaultDatabase()
Returns the global singleton VehicleDatabase instance.
void readDatabaseFromFolder(const File &folder)
Reads vehicle data and search terms from DBF and INI files in the given folder.
Buffer< fltp08 > overall_length
Vehicle overall lengths, one per record.
Buffer< fltp08 > overall_width
Vehicle overall widths, one per record.
Buffer< uint04 > vehicle_year
Vehicle model years, one per record.
uint04 recordCount() const
Returns the total number of vehicle records.
Buffer< String > vehicle_makes
Vehicle manufacturer names, one per record.
A read-only accessor for a single vehicle record within a VehicleDatabase, providing make,...
const uint04 & year() const
Returns the vehicle model year.
const Vector< 3, fltp08 > dimensions() const
Returns the vehicle overall dimensions (length, width, height).
const fltp08 & curbWeight() const
Returns the vehicle curb weight.
VehicleRecord(uint04 index, const VehicleDatabase *database)
Constructs a record accessor for the given index in a database.
const String & make() const
Returns the vehicle manufacturer name.
const VehicleDatabase *const m_database
The owning database providing field data.
const uint04 m_index
Index of this record within the database buffers.
File modelFile() const
Returns the file path to the associated 3D model.
const String & model() const
Returns the vehicle model name.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint04 score(const VehicleRecord &record) const
Computes a match score for the given record against this search item.
String model_exclude_terms
Keywords to exclude from model matching.
String make_search_terms
Keywords to match against vehicle make (space-separated).
uint04 start_year
Earliest valid year (inclusive), or Invalid for no lower bound.
String make_exclude_terms
Keywords to exclude from make matching.
uint04 end_year
Latest valid year (inclusive), or Invalid for no upper bound.
bool isValid(const VehicleRecord &record) const
Checks whether the given record matches this search item's criteria.
void getINI(INIFactory &factory) override
Populates the given INI factory with the options managed by this interface.
VehicleSearchItem(const File &default_file)
Constructs a search item that reads/writes its INI from the given file.
String model_search_terms
Keywords to match against vehicle model (space-separated).
File model_file
The 3D model file to use for matching vehicles.