51Degrees Device Detection C/C++  4.1

A device detection library that is used natively or by 51Degrees products

FiftyoneDegrees::DeviceDetection::EvidenceDeviceDetection Class Reference

Detailed Description

Device detection specific evidence class containing evidence to be processed by a device detection engine.

This wraps a dynamically generated C evidence structure.

The class extends the EvidenceBase class to implement the EvidenceBase::isRelevant method to return for device detection specific evidence keys.

Usage Example

// Construct a new evidence instance
// Add an item of evidence
evidence->operator[]("evidence key") = "evidence value";
// Give the evidence to an engine for processing
// Do something with the results (and delete them once finished)
// ...
// Delete the evidence
delete evidence;
Hash/GettingStarted.cpp, Hash/MatchMetrics.cpp, and Hash/StronglyTyped.cpp.

Inheritance diagram for FiftyoneDegrees::DeviceDetection::EvidenceDeviceDetection:


Collaboration diagram for FiftyoneDegrees::DeviceDetection::EvidenceDeviceDetection:


Public Member Functions


 EvidenceDeviceDetection ()
Construct a new instance containing no evidence. More...

Public Member Functions inherited from FiftyoneDegrees::Common::EvidenceBase

 EvidenceBase ()
Construct a new instance containing no evidence.
 ~EvidenceBase ()
Free all the underlying memory containing the evidence.
fiftyoneDegreesEvidenceKeyValuePairArray *  get ()
Get the underlying C structure containing the evidence. More...
void  clear ()
Clear all evidence items from the instance.
void  erase (iterator position)
Remove the evidence item at the position indicated. More...
void  erase (iterator first, iterator last)
Remove the evidence items between the two position indicated. More...

Protected Member Functions

bool  isRelevant (fiftyoneDegreesEvidencePrefix prefix)
Get whether or not the evidence key prefix is relevant or not. More...

Constructor & Destructor Documentation

◆ EvidenceDeviceDetection()

FiftyoneDegrees::DeviceDetection::EvidenceDeviceDetection::EvidenceDeviceDetection ( )

Construct a new instance containing no evidence.

Member Function Documentation

◆ isRelevant()

bool FiftyoneDegrees::DeviceDetection::EvidenceDeviceDetection::isRelevant ( fiftyoneDegreesEvidencePrefix   prefix )
protected virtual

Get whether or not the evidence key prefix is relevant or not.

If the prefix is not relevant or not known then it is of no use to the engine processing it.

prefix - extracted from the evidence key
true if the key prefix relevant and should be used

Reimplemented from FiftyoneDegrees::Common::EvidenceBase.

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