NDEVR
API Documentation
VehicleSearchItem

A search filter that maps vehicle database records to a specific 3D model file by matching make/model keywords and year ranges. More...

Inheritance diagram for VehicleSearchItem:
[legend]
Collaboration diagram for VehicleSearchItem:
[legend]

Public Member Functions

 VehicleSearchItem (const File &default_file)
 Constructs a search item that reads/writes its INI from the given file.
void getINI (INIFactory &factory) override
 Populates the given INI factory with the options managed by this interface.
bool isValid (const VehicleRecord &record) const
 Checks whether the given record matches this search item's criteria.
uint04 score (const VehicleRecord &record) const
 Computes a match score for the given record against this search item.
Public Member Functions inherited from INIInterface
 INIInterface ()
 Constructs an INIInterface with no default INI file.
 INIInterface (const File &default_ini)
 Constructs an INIInterface with the specified default INI file.
virtual ~INIInterface ()
 Virtual destructor for safe polymorphic cleanup.
virtual void finishReadingINI (INIFactory &)
 Called after reading an INI file.
virtual void prepareForINI (INIFactory &)
 Called before reading or writing an INI file.
virtual bool readINIOptions ()
 Reads INI options from the default INI file.
virtual bool readINIOptions (File &ini_file)
 Reads INI options from the specified INI file.
virtual bool saveINIOptions (bool multithead=false)
 Saves INI options to the default INI file.
virtual bool saveINIOptions (File &ini_file, bool multithead=false)
 Saves INI options to the specified INI file.
void setDefaultINIFile (const File &file)
 Sets the default INI file path used for reading and writing options.
virtual void writeToLog (const StringView &title, LogPtr log, uint01 log_level=2U)
 Writes the current INI options to the specified log with a title.
virtual void writeToLog (LogPtr log, uint01 log_level=2U)
 Writes the current INI options to the specified log.

Public Attributes

uint04 end_year = Constant<uint04>::Invalid
 Latest valid year (inclusive), or Invalid for no upper bound.
String make_exclude_terms
 Keywords to exclude from make matching.
String make_search_terms
 Keywords to match against vehicle make (space-separated).
String model_exclude_terms
 Keywords to exclude from model matching.
File model_file
 The 3D model file to use for matching vehicles.
String model_search_terms
 Keywords to match against vehicle model (space-separated).
uint04 start_year = Constant<uint04>::Invalid
 Earliest valid year (inclusive), or Invalid for no lower bound.

Additional Inherited Members

Protected Attributes inherited from INIInterface
File m_default_ini
 The default file path used for reading and writing INI options.

Detailed Description

A search filter that maps vehicle database records to a specific 3D model file by matching make/model keywords and year ranges.


Definition at line 47 of file VehicleDatabase.h.

Constructor & Destructor Documentation

◆ VehicleSearchItem()

VehicleSearchItem::VehicleSearchItem ( const File & default_file)
inline

Constructs a search item that reads/writes its INI from the given file.

Parameters
[in]default_fileThe INI file path.

Definition at line 59 of file VehicleDatabase.h.

References INIInterface::INIInterface().

Member Function Documentation

◆ getINI()

void VehicleSearchItem::getINI ( INIFactory & factory)
overridevirtual

Populates the given INI factory with the options managed by this interface.

Parameters
[in]factoryThe INI factory to populate with option definitions.

Implements INIInterface.

◆ isValid()

bool VehicleSearchItem::isValid ( const VehicleRecord & record) const

Checks whether the given record matches this search item's criteria.

Parameters
[in]recordThe vehicle record to test.
Returns
true if the record matches.

◆ score()

uint04 VehicleSearchItem::score ( const VehicleRecord & record) const

Computes a match score for the given record against this search item.

Parameters
[in]recordThe vehicle record to score.
Returns
A score where higher values indicate better matches.

The documentation for this struct was generated from the following file: