◆ ResultsHash()
FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::ResultsHash | ( | fiftyoneDegreesResultsHash * | results, |
shared_ptr< fiftyoneDegreesResourceManager > | manager | ||
) |
Create a new instance of Results from the results structure provided.
This method should only be called from inside an engine's process method.
- Parameters
-
- results - pointer to the underlying results structure
- manager - shared pointer to the manager which manages the data set used to create the results. This is needed for thread-safe operation, see local variable description for more info.
Member Function Documentation
◆ getDeviceId() [1/2]
string FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getDeviceId ( uint32_t resultIndex ) Returns the unique device id if the Id property was included in the required list of properties when the Provider was constructed.
- Parameters
-
- resultIndex - index of the individual User-Agent in the results
- Returns
- device id string
- Examples
- Hash/MatchMetrics.cpp.
◆ getDeviceId() [2/2]
string FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getDeviceId ( ) virtualReturns the unique device id if the Id property was included in the required list of properties when the Provider was constructed.
- Returns
- profile ids separated with a '-' character
Implements FiftyoneDegrees::DeviceDetection::ResultsDeviceDetection.
◆ getDifference() [1/2]
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getDifference ( ) Returns the total difference between the results returned and the target User-Agents.
Where multiple evidence items are used, this is the total difference.
- Returns
- total difference
- Examples
- Hash/MatchMetrics.cpp.
◆ getDifference() [2/2]
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getDifference ( uint32_t resultIndex ) Returns the difference between the result returned and the target User-Agent.
- Parameters
-
- resultIndex - index of the individual User-Agent in the results
- Returns
- individual difference
◆ getDrift() [1/2]
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getDrift ( ) Returns the maximum drift for a matched substring from the character position where it was expected to be found.
The higher this value, the less accurate the results should be considered.
- Returns
- int maximum drift
- Examples
- Hash/MatchMetrics.cpp.
◆ getDrift() [2/2]
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getDrift ( uint32_t resultIndex ) Returns the drift for a matched substring from the character position where it was expected to be found.
The higher this value, the lass accurate the results should be considered.
- Parameters
-
- resultIndex - index of the individual User-Agent in the results
- Returns
- individual drift
◆ getIterations()
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getIterations ( ) Get the number of iterations carried out in order to find a match.
This is the number of nodes in the graph which have been visited.
- Returns
- number of iterations
- Examples
- Hash/MatchMetrics.cpp.
◆ getMatchedNodes()
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getMatchedNodes ( ) Returns the number of hash nodes matched within the evidence.
- Returns
◆ getMethod() [1/2]
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getMethod ( ) Returns the method used to determine the match result.
See fiftyoneDegreesHashMatchMethod
- Returns
- highest method used
- Examples
- Hash/MatchMetrics.cpp.
◆ getMethod() [2/2]
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getMethod ( uint32_t resultIndex ) Returns the method used to determine the match result.
See fiftyoneDegreesHashMatchMethod
- Parameters
-
- resultIndex - index of the individual User-Agent in the results
- Returns
- individual method used
◆ getNoValueMessageInternal()
const char* FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getNoValueMessageInternal ( fiftyoneDegreesResultsNoValueReason reason ) protected virtualGet the message explaining the reason for missing values.
This can differ slightly between APIs, so the implementation of this is left up to the extending class. This is used when populating a Value instance to return.
- Parameters
-
- reason - the enum indicating the reason no values are available
- Returns
- string explaining the reason in more detail
Implements FiftyoneDegrees::Common::ResultsBase.
◆ getNoValueReasonInternal()
fiftyoneDegreesResultsNoValueReason FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getNoValueReasonInternal ( int requiredPropertyIndex ) protected virtualGet the reason for values not being available.
This is implemented by the extending class and is called when the hasValuesInternal method returns false.
- Parameters
-
- requiredPropertyIndex - index in the available properties
- Returns
- enum indicating the reason for values not being available
Implements FiftyoneDegrees::Common::ResultsBase.
◆ getTrace() [1/2]
string FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getTrace ( ) Get the trace route in a readable format showing the hash nodes which were visited during processing.
- Returns
- trace route string
◆ getTrace() [2/2]
string FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getTrace ( uint32_t resultIndex ) Get the trace route in a readable format for the result index specified showing the hash nodes which were visited during processing.
- Parameters
-
- resultIndex - index to get the trace route for
- Returns
- trace route string
◆ getUserAgent()
string FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getUserAgent ( int resultIndex ) virtualReturns relevant parts of the User-Agent which most closely matched the target User-Agent if the ConfigDeviceDetection::setUpdateMatchedUserAgent flag was set to true in the configuration.
- Returns
- string set to the HTTP header value matched
Implements FiftyoneDegrees::DeviceDetection::ResultsDeviceDetection.
- Examples
- Hash/MatchMetrics.cpp.
◆ getUserAgents()
int FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getUserAgents ( ) virtualReturns the number of different User-Agents that were used in the results.
- Returns
- the number of User-Agents available to query with getUserAgent
Implements FiftyoneDegrees::DeviceDetection::ResultsDeviceDetection.
◆ getValuesInternal()
void FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::getValuesInternal ( int requiredPropertyIndex, vector< string > & values ) protected virtualGet the values for the index in required properties and add them to the values vector supplied.
This is implemented by extending classes.
- Parameters
-
- requiredPropertyIndex - index in the available properties
- values - vector to populate with the values for the property
Implements FiftyoneDegrees::Common::ResultsBase.
◆ hasValuesInternal()
bool FiftyoneDegrees::DeviceDetection::Hash::ResultsHash::hasValuesInternal ( int requiredPropertyIndex ) protected virtualGet whether or not there are valid values available for the property identified by its index in the required properties.
This is implemented by extending classes, and used when populating a Value instance to return.
- Parameters
-
- requiredPropertyIndex - index in the available properties
- Returns
- true if there are values available for the property
Implements FiftyoneDegrees::Common::ResultsBase.
The documentation for this class was generated from the following file:- /home/vsts/work/1/s/apis/device-detection-cxx/src/hash/ResultsHash.hpp