1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// MCpp_Board.h - MULTICAM C++ API - BoardList
#if !defined(__MCPP_BOARDLIST_H__)
#define __MCPP_BOARDLIST_H__
 
namespace Euresys
{
  namespace MultiCam
  {
    // ********************************************************************************************
    // BoardList class
    // ---------------
    class BoardListImpl
    {
    private:
      Board **List;
      int Count;
 
    public:
      BoardListImpl();
      ~BoardListImpl();
      void Init();
 
      Board *operator[] (int driverIndex) { return GetBoardByDriverIndex(driverIndex); }
      Board *GetBoardByDriverIndex(int driverIndex);
      Board *GetBoardByPciPosition(int pciPosition);
      Board *GetBoardByBoardName(const char *boardName);
      Board *GetBoardByBoardIdentifier(const char *boardIdentifier);
      int GetCount();
      void Clear();
    };
 
    inline BoardListImpl* GetBoardListImpl()
    {
      static BoardListImpl impl;
      return &impl;
    }
 
    class BoardList
    {
    public:
      void Init() { GetBoardListImpl()->Init(); }
      Board *operator[] (int driverIndex) { return GetBoardListImpl()->GetBoardByDriverIndex(driverIndex); }
      Board *GetBoardByDriverIndex(int driverIndex) { return GetBoardListImpl()->GetBoardByDriverIndex(driverIndex); }
      Board *GetBoardByPciPosition(int pciPosition) { return GetBoardListImpl()->GetBoardByPciPosition(pciPosition); }
      Board *GetBoardByBoardName(const char *boardName) { return GetBoardListImpl()->GetBoardByBoardName(boardName); }
      Board *GetBoardByBoardIdentifier(const char *boardIdentifier) { return GetBoardListImpl()->GetBoardByBoardIdentifier(boardIdentifier); }
      int GetCount() { return GetBoardListImpl()->GetCount(); }
      void Clear() { GetBoardListImpl()->Clear(); }
    };
  }
}
 
#endif