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
using namespace FiftyoneDegrees::DeviceDetection;
EngineDeviceDetection *engine;
// Construct a new evidence instance
// Add an item of evidence
evidence->operator[]("evidence key") = "evidence value";
// Give the evidence to an engine for processing
ResultsDeviceDetection *results = engine->processDeviceDetection(
evidence);
// Do something with the results (and delete them once finished)
// ...
// Delete the evidence
delete evidence;
Encapsulates the device detection engine class to be extended by device detection engine implementati...
Definition EngineDeviceDetection.hpp:84
virtual ResultsDeviceDetection * processDeviceDetection(EvidenceDeviceDetection *evidence) const =0
Processes the evidence provided and returns the result.
EvidenceDeviceDetection()
Construct a new instance containing no evidence.
Definition EvidenceDeviceDetection.hpp:74
Encapsulates the results of a device detection engine's processing.
Definition ResultsDeviceDetection.hpp:76
Device Detection specific classes.
Definition ComponentMetaDataBuilderHash.hpp:34
- Examples
- 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 | |
Constructor | |
| EvidenceDeviceDetection () | |
| Construct a new instance containing no evidence. | |
Public Member Functions inherited from FiftyoneDegrees::Common::EvidenceBase | |
| EvidenceBase () | |
| Construct a new instance containing no evidence. | |
| virtual | ~EvidenceBase () |
| Free all the underlying memory containing the evidence. | |
| fiftyoneDegreesEvidenceKeyValuePairArray * | get () |
| Get the underlying C structure containing the evidence. | |
| void | clear () |
| Clear all evidence items from the instance. | |
| void | erase (iterator position) |
| Remove the evidence item at the position indicated. | |
| void | erase (iterator first, iterator last) |
| Remove the evidence items between the two position indicated. | |
Protected Member Functions | |
| bool | isRelevant (fiftyoneDegreesEvidencePrefix prefix) |
| Get whether or not the evidence key prefix is relevant or not. | |
Constructor & Destructor Documentation
◆ EvidenceDeviceDetection()
|
inline |
Construct a new instance containing no evidence.
Member Function Documentation
◆ isRelevant()
|
protectedvirtual |
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.
- Parameters
-
prefix extracted from the evidence key
- Returns
- 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:
