X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fldapc%2B%2B%2Fsrc%2FStringList.h;h=8ada6da10b00fdefe328ea67b1a82ac6e9498e6e;hb=b8edf539f21664f84c9acbb006ffa26aa7cd4931;hp=63134040ea2d69836ae8ba718de581eda282acf9;hpb=32671aa898feee3ca88b82a006e422af12472aa8;p=openldap diff --git a/contrib/ldapc++/src/StringList.h b/contrib/ldapc++/src/StringList.h index 63134040ea..8ada6da10b 100644 --- a/contrib/ldapc++/src/StringList.h +++ b/contrib/ldapc++/src/StringList.h @@ -1,5 +1,6 @@ +// $OpenLDAP$ /* - * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2013 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -8,18 +9,18 @@ #include #include -typedef list ListType; - /** * Container class to store multiple string-objects */ class StringList{ - typedef ListType::const_iterator const_iterator; - + typedef std::list ListType; + private: ListType m_data; public: + typedef ListType::const_iterator const_iterator; + /** * Constructs an empty list. */ @@ -54,7 +55,7 @@ class StringList{ * Adds one element to the end of the list. * @param attr The attribute to add to the list. */ - void add(const string& value); + void add(const std::string& value); /** * @return The number of strings that are currently @@ -62,6 +63,12 @@ class StringList{ */ size_t size() const; + /** + * @return true if there are zero strings currently + * stored in this list. + */ + bool empty() const; + /** * @return A iterator that points to the first element of the list. */