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
Ptr< IItem > at(int index) const
Definition: i_list.h:22
Definition: interface.h:49
virtual IItem * getAt(int index) const =0
Definition: ptr.h:18
Definition: apple_utils.h:6
Definition: i_list.h:9