]> git.sur5r.net Git - openldap/commitdiff
empty() and size() methods
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 15 Apr 2008 01:29:26 +0000 (01:29 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 15 Apr 2008 01:29:26 +0000 (01:29 +0000)
contrib/ldapc++/src/LDAPModList.cpp
contrib/ldapc++/src/LDAPModList.h

index 6042e0359b4d098a97714b737db7eeee9ff1063c..5f3c89d4ba280e424df073215edae41efe2dfc1f 100644 (file)
@@ -38,3 +38,11 @@ LDAPMod** LDAPModList::toLDAPModArray(){
     }
     return ret;
 }
+
+bool LDAPModList::empty() const {
+    return m_modList.empty();
+}
+
+unsigned int LDAPModList::size() const {
+    return m_modList.size();
+}
index ea3d506cb6fac282614db999f5e84bff8b926cab..2da4d9991126134c8fcea508e3d36541cb893c8c 100644 (file)
@@ -16,9 +16,9 @@
  * This container class is used to store multiple LDAPModification-objects.
  */
 class LDAPModList{
-        typedef std::list<LDAPModification> ListType;
+    typedef std::list<LDAPModification> ListType;
 
-       public : 
+    public : 
         /**
          * Constructs an empty list.
          */   
@@ -41,7 +41,17 @@ class LDAPModList{
          */
         LDAPMod** toLDAPModArray();
 
-       private : 
+        /**
+         * @returns true, if the ModList contains no Operations
+         */
+        bool empty() const;
+        
+        /**
+         * @returns number of Modifications in the ModList
+         */
+        unsigned int size() const;
+
+    private : 
         ListType m_modList;
 };
 #endif //LDAP_MOD_LIST_H