nx_metadata_sdk 1.0 Metadata SDK

i_list.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/analytics/i_object_metadata.h>
6
7 namespace nx {
8 namespace sdk {
9
10 template<typename IItem>
11 class IList: public Interface<IList<IItem>>
12 {
13 public:
14 static auto interfaceId()
15 {
16 return IList::template makeIdForTemplate<IList<IItem>, IItem>("nx::sdk::IList");
17 }
18
19 virtual int count() const = 0;
20
22 protected: virtual IItem* getAt(int index) const = 0;
23 public: Ptr<IItem> at(int index) const { return toPtr(getAt(index)); }
24 };
25
26 } // namespace sdk
27 } // namespace nx
nx::sdk::Interface
Definition: interface.h:28
nx::sdk::IList::getAt
virtual IItem * getAt(int index) const =0
nx::sdk::Ptr
Definition: ptr.h:18
nx
Definition: apple_utils.h:6
nx::sdk::IList
Definition: i_list.h:11