3 * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
13 * Container class to store multiple string-objects
16 typedef std::list<std::string> ListType;
22 typedef ListType::const_iterator const_iterator;
25 * Constructs an empty list.
32 StringList(const StringList& sl);
35 * For internal use only
37 * This constructor is used by the library internally to create a
38 * list of string from a array for c-Strings (char*)thar was
39 * returned by the C-API
41 StringList(char** values);
49 * The methods converts the list to a 0-terminated array of
52 char** toCharArray() const;
55 * Adds one element to the end of the list.
56 * @param attr The attribute to add to the list.
58 void add(const std::string& value);
61 * @return The number of strings that are currently
62 * stored in this list.
67 * @return true if there are zero strings currently
68 * stored in this list.
73 * @return A iterator that points to the first element of the list.
75 const_iterator begin() const;
78 * @return A iterator that points to the element after the last
79 * element of the list.
81 const_iterator end() const;
84 * removes all elements from the list
88 #endif //STRING_LIST_H