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