nx_server_plugin_sdk 1.0 Server Plugin 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/i_attribute.h>
6 #include <nx/sdk/interface.h>
7
8 namespace nx::sdk::analytics {
9
14 class IMetadata: public Interface<IMetadata>
15 {
16 public:
17 static auto interfaceId() { return makeId("nx::sdk::analytics::IMetadata"); }
18
22 virtual const char* typeId() const = 0;
23
27 virtual float confidence() const = 0;
28
30 protected: virtual const IAttribute* getAttribute(int index) const = 0;
40 public: Ptr<const IAttribute> attribute(int index) const { return Ptr(getAttribute(index)); }
41
45 virtual int attributeCount() const = 0;
46 };
47 using IMetadata0 = IMetadata;
48
49 } // namespace nx::sdk::analytics
nx::sdk::Interface
Definition: interface.h:48
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics::IMetadata
Definition: i_metadata.h:14
nx::sdk::analytics
Definition: consuming_device_agent.cpp:25
nx::sdk::analytics::IMetadata::confidence
virtual float confidence() const =0
nx::sdk::IAttribute
Definition: i_attribute.h:9
nx::sdk::analytics::IMetadata::attribute
Ptr< const IAttribute > attribute(int index) const
Definition: i_metadata.h:40
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 const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:77
nx::sdk::analytics::IMetadata::getAttribute
virtual const IAttribute * getAttribute(int index) const =0