2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
12 * Container class to store multiple string-objects
15 typedef std::list<std::string> ListType;
21 typedef ListType::const_iterator const_iterator;
24 * Constructs an empty list.
31 StringList(const StringList& sl);
34 * For internal use only
36 * This constructor is used by the library internally to create a
37 * list of string from a array for c-Strings (char*)thar was
38 * returned by the C-API
40 StringList(char** values);
48 * The methods converts the list to a 0-terminated array of
51 char** toCharArray() const;
54 * Adds one element to the end of the list.
55 * @param attr The attribute to add to the list.
57 void add(const std::string& value);
60 * @return The number of strings that are currently
61 * stored in this list.
66 * @return true if there are zero strings currently
67 * stored in this list.
72 * @return A iterator that points to the first element of the list.
74 const_iterator begin() const;
77 * @return A iterator that points to the element after the last
78 * element of the list.
80 const_iterator end() const;
83 * removes all elements from the list
87 #endif //STRING_LIST_H