Skip to content

Commit

Permalink
Expanded Listmodel with add and clear elements functions
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Nov 9, 2024
1 parent 265fde6 commit d6bf10a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/guisan/listmodel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace gcn
/**
* Destructor.
*/
virtual ~ListModel() { }
virtual ~ListModel() {}

/**
* Gets the number of elements in the list.
Expand All @@ -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() {}
};
}

Expand Down

0 comments on commit d6bf10a

Please sign in to comment.