FifeGUI 0.3.0
A C++ GUI library designed for games.
listmodel.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause
2// SPDX-FileCopyrightText: 2004 - 2008 Olof Naessén and Per Larsson
3// SPDX-FileCopyrightText: 2013 - 2026 Fifengine contributors
4
5#ifndef INCLUDE_FIFECHAN_LISTMODEL_HPP_
6#define INCLUDE_FIFECHAN_LISTMODEL_HPP_
7
8// Standard library includes
9#include <string>
10
11// Platform config include
12#include "fifechan/platform.hpp"
13
14namespace fcn
15{
25 class FIFEGUI_API ListModel
26 {
27
28 public:
32 virtual ~ListModel() = default;
33
37 ListModel(ListModel const &) = default;
38
42 ListModel& operator=(ListModel const &) = default;
43
47 ListModel(ListModel&&) = default;
48
53
59 virtual int getNumberOfElements() = 0;
60
67 virtual std::string getElementAt(int i) = 0;
68
69 protected:
70 ListModel() = default;
71 };
72} // namespace fcn
73
74#endif // INCLUDE_FIFECHAN_LISTMODEL_HPP_
ListModel(ListModel &&)=default
Move constructor.
virtual int getNumberOfElements()=0
Gets the number of elements in the list.
ListModel & operator=(ListModel &&)=default
Move assignment operator.
ListModel & operator=(ListModel const &)=default
Copy assignment operator.
ListModel(ListModel const &)=default
Copy constructor.
virtual ~ListModel()=default
Virtual destructor.
virtual std::string getElementAt(int i)=0
Gets an element at a certain index in the list.
Used replacement tokens by configure_file():