nx_metadata_sdk 1.0 Metadata SDK

i_metadata.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 #include <nx/sdk/i_attribute.h>
7
8 namespace nx {
9 namespace sdk {
10 namespace analytics {
11
16 class IMetadata: public Interface<IMetadata>
17 {
18 public:
19 static auto interfaceId() { return makeId("nx::sdk::analytics::IMetadata"); }
20
24 virtual const char* typeId() const = 0;
25
29 virtual float confidence() const = 0;
30
37 protected: virtual const IAttribute* getAttribute(int index) const = 0;
38 public: Ptr<const IAttribute> attribute(int index) const { return toPtr(getAttribute(index)); }
39
43 virtual int attributeCount() const = 0;
44 };
45
46 } // namespace analytics
47 } // namespace sdk
48 } // namespace nx
nx::sdk::Interface
Definition: interface.h:28
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics::IMetadata
Definition: i_metadata.h:16
nx::sdk::analytics::IMetadata::confidence
virtual float confidence() const =0
nx::sdk::IAttribute
Definition: i_attribute.h:10
nx
Definition: apple_utils.h:6
nx::sdk::analytics::IMetadata::attributeCount
virtual int attributeCount() const =0
nx::sdk::analytics::IMetadata::typeId
virtual const char * typeId() const =0
nx::sdk::IRefCountable::makeId
static constexpr const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:78
nx::sdk::analytics::IMetadata::getAttribute
virtual const IAttribute * getAttribute(int index) const =0