nx_metadata_sdk 1.0 Metadata SDK

i_attribute.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <nx/sdk/interface.h>
6
7 namespace nx {
8 namespace sdk {
9
10 class IAttribute: public Interface<IAttribute>
11 {
12 public:
13 enum class Type: int
14 {
15 undefined,
16 number,
17 boolean,
18 string,
19 // TODO: Consider adding other specific types like DateTime, Coordinates, Temperature.
20 };
21
22 static auto interfaceId() { return makeId("nx::sdk::IAttribute"); }
23
24 virtual Type type() const = 0;
25 virtual const char* name() const = 0;
26 virtual const char* value() const = 0;
27 virtual float confidence() const = 0;
28 };
29
30 } // namespace sdk
31 } // namespace nx
nx::sdk::Interface
Definition: interface.h:28
nx::sdk::IAttribute
Definition: i_attribute.h:10
nx
Definition: apple_utils.h:6
nx::sdk::IRefCountable::makeId
static constexpr const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:78