|
Contents:
Search: |
StringListOverviewA StringList is for communicating a list of strings between Emdros and the program using Emdros. The list is ordered, and can be iterated with the normal Emdros-iterators.
#include <string_list.h>
class StringListConstIterator {
public:
StringListConstIterator();
StringListConstIterator(const StringList *pMotherStringList); // Not SWIG-wrapped.
StringListConstIterator(const StringListConstIterator& other);
~StringListConstIterator();
bool hasNext() const; // Is the iterator == end iterator? Doesn't alter iterator
std::string next(); // Gets current and advances iterator afterwards
std::string previous(); // Regresses iterator and then gets current
std::string current(); // Gets current without altering iterator
};
class StringList {
public:
// Create empty string list, to be populated later
// with addStringListNodes.
StringList();
// Copy constructor
StringList(const StringList& other);
// Assignment operator
const StringList& operator=(const StringList& other); // Not SWIG-wrapped!
~StringList();
StringListConstIterator const_iterator() const;
// Add at beginning of list, pushing everything down one member
void addStringFront(const std::string& str);
// Add at end of list
void addStringBack(const std::string& str);
bool isEmpty(void) const;
};
|