]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/StringList.h
Merge remote branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / contrib / ldapc++ / src / StringList.h
index 63134040ea2d69836ae8ba718de581eda282acf9..8ada6da10b00fdefe328ea67b1a82ac6e9498e6e 100644 (file)
@@ -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 <string>
 #include <list>
-typedef list<string> ListType;
-
 /**
  * Container class to store multiple string-objects
  */
 class StringList{
-    typedef ListType::const_iterator const_iterator;
-   
+    typedef std::list<std::string> 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.
          */