From d6bf10a0e7c4cf1a61ba98fb9960f6333038264d Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sat, 9 Nov 2024 17:41:44 +0100 Subject: [PATCH] Expanded Listmodel with add and clear elements functions --- include/guisan/listmodel.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/guisan/listmodel.hpp b/include/guisan/listmodel.hpp index f3be319..ec73498 100644 --- a/include/guisan/listmodel.hpp +++ b/include/guisan/listmodel.hpp @@ -76,7 +76,7 @@ namespace gcn /** * Destructor. */ - virtual ~ListModel() { } + virtual ~ListModel() {} /** * Gets the number of elements in the list. @@ -92,6 +92,12 @@ namespace gcn * @return An element as a string at the a certain index. */ virtual std::string getElementAt(int i) = 0; + + // Add a new element + virtual void add(const std::string& str) {} + + // Clear all elements + virtual void clear_elements() {} }; }