◆ EngineHash() [1/4]
FiftyoneDegrees::DeviceDetection::Hash::EngineHash::EngineHash | ( | const char * | fileName, |
ConfigHash * | config, | ||
RequiredPropertiesConfig * | properties | ||
) |
Construct a new instance of the engine class with the configuration and properties provided.
- Parameters
-
- config - used to build the engine
- properties - the properties expected to be fetched from results The data set is constructed from the file provided.
- fileName - path to the file containing the data file to load
◆ EngineHash() [2/4]
FiftyoneDegrees::DeviceDetection::Hash::EngineHash::EngineHash ( const string & fileName, ConfigHash * config, RequiredPropertiesConfig * properties ) Construct a new instance of the engine class with the configuration and properties provided.
- Parameters
-
- config - used to build the engine
- properties - the properties expected to be fetched from results The data set is constructed from the file provided.
- fileName - path to the file containing the data file to load
◆ EngineHash() [3/4]
FiftyoneDegrees::DeviceDetection::Hash::EngineHash::EngineHash ( void * data, long length, ConfigHash * config, RequiredPropertiesConfig * properties ) Construct a new instance of the engine class with the configuration and properties provided.
- Parameters
-
- config - used to build the engine
- properties - the properties expected to be fetched from results The data set is constructed from data stored in memory described by the data and length parameters.
- data - pointer to the memory containing the data set
- length - size of the data in memory
◆ EngineHash() [4/4]
FiftyoneDegrees::DeviceDetection::Hash::EngineHash::EngineHash ( unsigned char data[], long length, ConfigHash * config, RequiredPropertiesConfig * properties ) Construct a new instance of the engine class with the configuration and properties provided.
- Parameters
-
- config - used to build the engine
- properties - the properties expected to be fetched from results The data set is constructed from data stored in memory described by the data and length parameters.
- data - pointer to the memory containing the data set
- length - size of the data in memory
Member Function Documentation
◆ getDataFilePath()
string FiftyoneDegrees::DeviceDetection::Hash::EngineHash::getDataFilePath ( ) const virtualGet the path to the data file the current data set was initialised from.
- Returns
- data file path
Implements FiftyoneDegrees::Common::EngineBase.
◆ getDataFileTempPath()
string FiftyoneDegrees::DeviceDetection::Hash::EngineHash::getDataFileTempPath ( ) const virtualGet the path to the temporary data file created by the engine, or an empty string if one was not created.
- Returns
- temp data file path or empty string
Implements FiftyoneDegrees::Common::EngineBase.
◆ getProduct()
string FiftyoneDegrees::DeviceDetection::Hash::EngineHash::getProduct ( ) const virtualGet the name of the data set being used e.g.
Pattern or Hash.
- Returns
- product name
Implements FiftyoneDegrees::Common::EngineBase.
◆ getPublishedTime()
Date FiftyoneDegrees::DeviceDetection::Hash::EngineHash::getPublishedTime ( ) const virtualGet the date at which the current data set was published.
- Returns
- data set published date
Implements FiftyoneDegrees::Common::EngineBase.
◆ getType()
string FiftyoneDegrees::DeviceDetection::Hash::EngineHash::getType ( ) const virtualGet the tier of the data set being used e.g.
Premium or Enterprise.
- Returns
- data set type
Implements FiftyoneDegrees::Common::EngineBase.
◆ getUpdateAvailableTime()
Date FiftyoneDegrees::DeviceDetection::Hash::EngineHash::getUpdateAvailableTime ( ) const virtualGet the date at which a new data file will be available to download from the URL returned by getDataUpdateUrl().
- Returns
- new data set available date
Implements FiftyoneDegrees::Common::EngineBase.
◆ init()
void FiftyoneDegrees::DeviceDetection::Hash::EngineHash::init ( fiftyoneDegreesDataSetHash * dataSet ) protectedInitialise the engine with the data set provided.
This is the data set which carries out all the processing in the engine.
- Parameters
-
- dataSet - pointer to the data used by the engine
◆ process() [1/2]
ResultsHash* FiftyoneDegrees::DeviceDetection::Hash::EngineHash::process ( EvidenceDeviceDetection * evidence ) const - Examples
- Hash/GettingStarted.cpp, Hash/MatchMetrics.cpp, and Hash/StronglyTyped.cpp.
◆ process() [2/2]
ResultsHash* FiftyoneDegrees::DeviceDetection::Hash::EngineHash::process ( const char * userAgent ) const ◆ processBase()
ResultsBase* FiftyoneDegrees::DeviceDetection::Hash::EngineHash::processBase ( EvidenceBase * evidence ) const virtualProcesses the evidence provided and returns the result.
- Parameters
-
- evidence - to process. The keys in getKeys() will be the only ones considered by the engine.
- Returns
- a new results instance with the values for all requested properties
Implements FiftyoneDegrees::Common::EngineBase.
◆ processDeviceDetection() [1/2]
ResultsDeviceDetection* FiftyoneDegrees::DeviceDetection::Hash::EngineHash::processDeviceDetection ( EvidenceDeviceDetection * evidence ) const virtualProcesses the evidence provided and returns the result.
- Parameters
-
- evidence - to process. The keys in getKeys() will be the only ones considered by the engine.
- Returns
- a new results instance with the values for all requested properties
Implements FiftyoneDegrees::DeviceDetection::EngineDeviceDetection.
◆ processDeviceDetection() [2/2]
ResultsDeviceDetection* FiftyoneDegrees::DeviceDetection::Hash::EngineHash::processDeviceDetection ( const char * userAgent ) const virtualProcesses the User-Agent provided and returns the result.
- Parameters
-
- userAgent - to process. This is equivalent to processing the string as an item of evidence with the User-Agent header key.
- Returns
- a new results instance with the values for all requested properties
Implements FiftyoneDegrees::DeviceDetection::EngineDeviceDetection.
◆ refreshData() [1/4]
void FiftyoneDegrees::DeviceDetection::Hash::EngineHash::refreshData ( ) const virtualRefresh the data set from the original file location.
This should be implemented by the extending class.
Implements FiftyoneDegrees::Common::EngineBase.
◆ refreshData() [2/4]
void FiftyoneDegrees::DeviceDetection::Hash::EngineHash::refreshData ( const char * fileName ) const virtualRefresh the data set from the file location provided.
- Parameters
-
- fileName - of the new data file
Implements FiftyoneDegrees::Common::EngineBase.
◆ refreshData() [3/4]
void FiftyoneDegrees::DeviceDetection::Hash::EngineHash::refreshData ( void * data, long length ) const virtualRefresh the data set from the memory location provided.
- Parameters
-
- data - pointer to the data in memory
- length - length of the data in memory
Implements FiftyoneDegrees::Common::EngineBase.
◆ refreshData() [4/4]
void FiftyoneDegrees::DeviceDetection::Hash::EngineHash::refreshData ( unsigned char data[], long length ) const virtualRefresh the data set from the memory location provided.
- Parameters
-
- data - pointer to the data in memory
- length - of the data in memory
Implements FiftyoneDegrees::Common::EngineBase.
The documentation for this class was generated from the following file:- /home/vsts/work/1/s/apis/device-detection-cxx/src/hash/EngineHash.hpp