From: Ralf Haferkamp Date: Fri, 4 Apr 2008 10:36:01 +0000 (+0000) Subject: empty() and size() methods X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~36 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=20d2188cbfae9be8e15c7f8fb42421781b7df833;p=openldap empty() and size() methods --- diff --git a/contrib/ldapc++/src/LDAPModList.cpp b/contrib/ldapc++/src/LDAPModList.cpp index 738cc4347e..9d822c99e3 100644 --- a/contrib/ldapc++/src/LDAPModList.cpp +++ b/contrib/ldapc++/src/LDAPModList.cpp @@ -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(); +} diff --git a/contrib/ldapc++/src/LDAPModList.h b/contrib/ldapc++/src/LDAPModList.h index ea3d506cb6..2da4d99911 100644 --- a/contrib/ldapc++/src/LDAPModList.h +++ b/contrib/ldapc++/src/LDAPModList.h @@ -16,9 +16,9 @@ * This container class is used to store multiple LDAPModification-objects. */ class LDAPModList{ - typedef std::list ListType; + typedef std::list 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