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 Coordinates, Temperature.
20 };
21
22 static auto interfaceId() { return makeId("nx::sdk::IAttribute"); }
23
24 virtual Type type() const = 0;
25
29 virtual const char* name() const = 0;
30
31 virtual const char* value() const = 0;
32
33 virtual float confidence() const = 0;
34 };
35 using IAttribute0 = IAttribute;
36
37 } // namespace sdk
38 } // namespace nx
nx::sdk::Interface
Definition: interface.h:49
nx::sdk::IAttribute
Definition: i_attribute.h:10
nx
Definition: apple_utils.h:6
nx::sdk::IAttribute::name
virtual const char * name() const =0
nx::sdk::IRefCountable::makeId
static constexpr const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:77