X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fldapc%2B%2B%2Fsrc%2FLDAPModList.h;h=6e49a3f108bcf10a7c4b521f3c7750e895b762b3;hb=cfa8dd6884f7d45154fb92651fd6e04aeb93dd0b;hp=e85631821c3697de0f977c1a26295749f3c0181f;hpb=b1957678d4fb82f5bb2af228606785bb49522fcc;p=openldap diff --git a/contrib/ldapc++/src/LDAPModList.h b/contrib/ldapc++/src/LDAPModList.h index e85631821c..6e49a3f108 100644 --- a/contrib/ldapc++/src/LDAPModList.h +++ b/contrib/ldapc++/src/LDAPModList.h @@ -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 */ @@ -11,18 +12,17 @@ #include #include -typedef list ModList; - /** * This container class is used to store multiple LDAPModification-objects. */ class LDAPModList{ + typedef std::list ListType; - public : + public : /** * Constructs an empty list. */ - LDAPModList(); + LDAPModList(); /** * Copy-constructor @@ -31,9 +31,9 @@ class LDAPModList{ /** * Adds one element to the end of the list. - * @param mod The LDAPModification to add to the list. + * @param mod The LDAPModification to add to the std::list. */ - void addModification(const LDAPModification &mod); + void addModification(const LDAPModification &mod); /** * Translates the list to a 0-terminated array of @@ -41,8 +41,18 @@ class LDAPModList{ */ LDAPMod** toLDAPModArray(); - private : - ModList m_modList; + /** + * @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