Detailed Description
Encapsulates the Hash engine class which implements EngineDeviceDetection.
This carries out processing using a Hash data set.
An engine is constructed with a configuration, and either a data file, or an in memory data set, then used to process evidence in order to return a set of results. It also exposes methods to refresh the data using a new data set, and get properties relating to the data set being used by the engine.
Usage Example
string dataFilePath;
void *inMemoryDataSet;
long inMemoryDataSetLength;
dataFilePath,
properties);
inMemoryDataSet,
inMemoryDataSetLength,
properties);
delete results;
delete engine;
- Examples
- Hash/GettingStarted.cpp, Hash/MatchMetrics.cpp, Hash/MetaData.cpp, and Hash/StronglyTyped.cpp.
Inheritance diagram for FiftyoneDegrees::DeviceDetection::Hash::EngineHash:
Collaboration diagram for FiftyoneDegrees::DeviceDetection::Hash::EngineHash:
Public Member Functions
Constructors |
| EngineHash (const char *fileName, ConfigHash *config, RequiredPropertiesConfig *properties)
Construct a new instance of the engine class with the configuration and properties provided. More...
|
| EngineHash (const string &fileName, ConfigHash *config, RequiredPropertiesConfig *properties)
Construct a new instance of the engine class with the configuration and properties provided. More...
|
| EngineHash (void *data, long length, ConfigHash *config, RequiredPropertiesConfig *properties)
Construct a new instance of the engine class with the configuration and properties provided. More...
|
| EngineHash (unsigned char data[], long length, ConfigHash *config, RequiredPropertiesConfig *properties)
Construct a new instance of the engine class with the configuration and properties provided. More...
|
Engine Methods |
ResultsHash *
| process (EvidenceDeviceDetection *evidence) const
|
ResultsHash *
| process (const char *userAgent) const
|
Common::EngineBase Implementation |
void
| refreshData () const
Refresh the data set from the original file location. More...
|
void
| refreshData (const char *fileName) const
Refresh the data set from the file location provided. More...
|
void
| refreshData (void *data, long length) const
Refresh the data set from the memory location provided. More...
|
void
| refreshData (unsigned char data[], long length) const
Refresh the data set from the memory location provided. More...
|
ResultsBase *
| processBase (EvidenceBase *evidence) const
Processes the evidence provided and returns the result. More...
|
Date
| getPublishedTime () const
Get the date at which the current data set was published. More...
|
Date
| getUpdateAvailableTime () const
|
string
| getDataFilePath () const
Get the path to the data file the current data set was initialised from. More...
|
string
| getDataFileTempPath () const
Get the path to the temporary data file created by the engine, or an empty string if one was not created. More...
|
string
| getProduct () const
Get the name of the data set being used e.g. More...
|
string
| getType () const
Get the tier of the data set being used e.g. More...
|
DeviceDetection::EngineDeviceDetection Implementation |
ResultsDeviceDetection *
| processDeviceDetection (EvidenceDeviceDetection *evidence) const
Processes the evidence provided and returns the result. More...
|
ResultsDeviceDetection *
| processDeviceDetection (const char *userAgent) const
Processes the User-Agent provided and returns the result. More...
|
|
| EngineDeviceDetection (ConfigDeviceDetection *config, RequiredPropertiesConfig *properties)
Construct a new instance of the engine class with the configuration and properties provided. More...
|
virtual ResultsDeviceDetection *
| processDeviceDetection (string &userAgent) const
Processes the User-Agent provided and returns the result. More...
|
|
| EngineBase (ConfigBase *config, RequiredPropertiesConfig *properties)
Construct a new instance of the engine class with the configuration and properties provided. More...
|
virtual
| ~EngineBase ()
Frees the meta data class and the data set resource created by the extending class.
|
void
| setLicenseKey (const string &licenseKey)
Sets the license key to be used when updating the data set. More...
|
void
| setDataUpdateUrl (const string &updateUrl)
Sets the URL to be used when updating the data set. More...
|
MetaData *
| getMetaData () const
Return the a pointer to the meta data class which contains meta data for the properties, values, profiles and components that exist within the engine. More...
|
bool
| getAutomaticUpdatesEnabled () const
Gets whether or not automatic updates are enabled. More...
|
virtual string
| getDataUpdateUrl () const
Get the URL to be used when updating the data file, or an empty string if this is not set. More...
|
const vector< string > *
| getKeys () const
Get the list of keys which the engine accepts as evidence. More...
|
bool
| getIsThreadSafe () const
Get whether or not the engine was compiled with thread-safe support. More...
|