A 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.

SPECIAL SWIG JAVA NOTE: Use of the StringListConstIterator is discouraged under Java. Instead, please use the getAsVector() method, which will return a Java Vector of Java String objects.

#include <string_list.h>

class StringListConstIterator {
  StringListConstIterator(const StringList *pMotherStringList); // Not SWIG-wrapped.
  StringListConstIterator(const StringListConstIterator& other);
  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 {
  // Create empty string list, to be populated later
  // with addStringListNodes.

  // Copy constructor
  StringList(const StringList& other);

  // Assignment operator
  const StringList& operator=(const StringList& other); // Not SWIG-wrapped!


  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);

  std::vector<std::string> getAsVector(void) const;

  // Return the length
  int getLength() const;

  bool isEmpty(void) const;

Up:Part II: APIs