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