nx_metadata_sdk  1.0
Metadata SDK
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 <string>
6 
7 #include <nx/sdk/i_attribute.h>
8 #include <nx/sdk/helpers/ref_countable.h>
9 
10 namespace nx {
11 namespace sdk {
12 
13 class Attribute: public nx::sdk::RefCountable<IAttribute>
14 {
15 public:
16  Attribute(
17  Type type,
18  std::string name,
19  std::string value,
20  float confidence = 1.0);
21 
22  virtual Type type() const override;
23  virtual const char* name() const override;
24  virtual const char* value() const override;
25  virtual float confidence() const override;
26 
27  void setValue(std::string value) { m_value = std::move(value); }
28 
29 private:
30  const Type m_type;
31  const std::string m_name;
32  std::string m_value;
33  float m_confidence;
34 };
35 
36 } // namespace sdk
37 } // namespace nx
Definition: apple_utils.h:6
Definition: ref_countable.h:84
Definition: attribute.h:13