From 20d2188cbfae9be8e15c7f8fb42421781b7df833 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Fri, 4 Apr 2008 10:36:01 +0000 Subject: [PATCH] empty() and size() methods --- contrib/ldapc++/src/LDAPModList.cpp | 8 ++++++++ contrib/ldapc++/src/LDAPModList.h | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) 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 -- 2.39.5