nx_metadata_sdk 1.0 Metadata SDK

timestamped_object_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 <vector>
6
7 #include <nx/sdk/analytics/i_timestamped_object_metadata.h>
8
9 #include <nx/sdk/ptr.h>
10 #include <nx/sdk/helpers/ref_countable.h>
11 #include <nx/sdk/analytics/helpers/object_metadata.h>
12 #include <nx/sdk/helpers/attribute.h>
13
14 namespace nx {
15 namespace sdk {
16 namespace analytics {
17
18 class TimestampedObjectMetadata: public RefCountable<ITimestampedObjectMetadata>
19 {
20 public:
21 TimestampedObjectMetadata();
22
23 virtual const char* subtype() const override;
24 virtual int attributeCount() const override;
25 virtual int64_t timestampUs() const override;
26 virtual const char* typeId() const override;
27 virtual float confidence() const override;
28
29 void setTypeId(std::string typeId);
30 void setConfidence(float confidence);
31 void setTrackId(const Uuid& value);
32 void setSubtype(const std::string& value);
33 void addAttribute(nx::sdk::Ptr<Attribute> attribute);
34 void addAttributes(const std::vector<nx::sdk::Ptr<Attribute>>& value);
35 void setBoundingBox(const Rect& rect);
36 void setTimestampUs(int64_t timestampUs);
37
38 protected:
39 virtual const IAttribute* getAttribute(int index) const override;
40 virtual void getTrackId(Uuid* outValue) const override;
41 virtual void getBoundingBox(Rect* outValue) const override;
42
43 private:
44 const nx::sdk::Ptr<nx::sdk::analytics::ObjectMetadata> m_objectMetadata;
45 int64_t m_timestampUs = 0;
46 };
47
48 } // namespace analytics
49 } // namespace sdk
50 } // namespace nx
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::Uuid
Definition: uuid.h:21
nx::sdk::IAttribute
Definition: i_attribute.h:10
nx
Definition: apple_utils.h:6
nx::sdk::analytics::TimestampedObjectMetadata
Definition: timestamped_object_metadata.h:18
nx::sdk::RefCountable
Definition: ref_countable.h:84
nx::sdk::analytics::Rect
Definition: rect.h:9