|
nx_server_plugin_sdk
1.0
Server Plugin SDK
|
#include <data.h>
Public Types | |
| enum | Type { attributePresenceCheck, attributeValueMatch, textMatch, numericRangeMatch } |
Public Member Functions | |
| AttributeSearchCondition (const nx::kit::Json &json) noexcept(false) | |
| AttributeSearchCondition (const char *jsonData) noexcept(false) | |
| template<typename T > | |
| AttributeSearchCondition (const T &)=delete | |
| bool | operator== (const AttributeSearchCondition &) const |
| nx::kit::Json | to_json () const |
Static Public Member Functions | |
| static ValueOrError< AttributeSearchCondition > | fromJson (const char *jsonStr) noexcept |
| static ValueOrError< AttributeSearchCondition > | fromJson (const nx::kit::Json &json) noexcept |
| static std::string | typeToString (Type type) |
| static Type | typeFromString (const std::string &s) |
Public Attributes | |
| Type | type |
| std::string | name |
| std::string | value |
| std::string | text |
| bool | isNegative = false |
| bool | matchesFromStart = false |
| bool | matchesTillEnd = false |
| NumericRange | range |
A search condition representation specifying how exactly to filter queried object tracks by their attributes.
Multiple condition match results are joined using AND logic. So for object track to be included in the result its attributes (any of them) should match every condition present in the Filter. I.e., bool objectTrackMatch = atLeastOneAttrMatch(condition_1) && ... && atLeastOneAttrMatch(condition_N)
All search types except 'textMatch' assume that ObjectTrack attribute name matches the condition name only if the match starts from the beginning and lasts till the end or the point separator.
For example, let one of the ObjectTrack Attribute equals to car.color=blue. Then the Search conditions with the following names should match: car, car.color. But not the ca, car.co, carxx or car.colov. In case of the textMatch for the Attribute to match search condition it's enough that either Attribute name or value contain AttributeSearchCondition::text. Condition name and value should be ignored in this case.
numericRangeMatch assumes that the Attribute value contains a valid NumericRange, and it it intersects with AttributeSearchCondition::range.
| bool nx::sdk::cloud_storage::AttributeSearchCondition::isNegative = false |
If it is set to true than the ObjectTrack should be included in the result only if it does not match the given condition.
| bool nx::sdk::cloud_storage::AttributeSearchCondition::matchesFromStart = false |
If it is set to true, then the value should be matched from the beginning.
| bool nx::sdk::cloud_storage::AttributeSearchCondition::matchesTillEnd = false |
If it is set to true, then the value should be matched till the end.
| NumericRange nx::sdk::cloud_storage::AttributeSearchCondition::range |
Used when type == numericRangeMatch. Object track attribute value should contain numeric range value and it should intersect the given condition value for the Object track to be included in the result.
1.8.14