]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/StringList.h
Merge remote branch 'origin/mdb.master'
[openldap] / contrib / ldapc++ / src / StringList.h
index dc3d678213abc1010aea75a49f7476cf168708fa..bced2f4bfd1e0303116d6ee30244fe149a3325f6 100644 (file)
@@ -1,5 +1,6 @@
+// $OpenLDAP$
 /*
- * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -8,12 +9,12 @@
 
 #include <string>
 #include <list>
-typedef list<string> ListType;
-
 /**
  * Container class to store multiple string-objects
  */
 class StringList{
+    typedef std::list<std::string> ListType;
+
     private:
         ListType m_data;
 
@@ -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.
          */