Back to index

openldap  2.4.31
Public Member Functions | Private Types | Private Attributes
LDAPModList Class Reference

This container class is used to store multiple LDAPModification-objects. More...

#include <LDAPModList.h>

Collaboration diagram for LDAPModList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LDAPModList ()
 Constructs an empty list.
 LDAPModList (const LDAPModList &)
 Copy-constructor.
void addModification (const LDAPModification &mod)
 Adds one element to the end of the list.
LDAPMod ** toLDAPModArray ()
 Translates the list to a 0-terminated array of LDAPMod-structures as needed by the C-API.
bool empty () const
unsigned int size () const

Private Types

typedef std::list
< LDAPModification
ListType

Private Attributes

ListType m_modList

Detailed Description

This container class is used to store multiple LDAPModification-objects.

Definition at line 18 of file LDAPModList.h.


Member Typedef Documentation

Definition at line 19 of file LDAPModList.h.


Constructor & Destructor Documentation

Constructs an empty list.

Definition at line 15 of file LDAPModList.cpp.

                        {
    DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModList::LDAPModList()" << endl);
}

Copy-constructor.

Definition at line 19 of file LDAPModList.cpp.

                                             {
    DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModList::LDAPModList(&)" << endl);
    m_modList=ml.m_modList;
}

Member Function Documentation

Adds one element to the end of the list.

Parameters:
modThe LDAPModification to add to the std::list.

Definition at line 24 of file LDAPModList.cpp.

                                                            {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPModList::addModification()" << endl);
       m_modList.push_back(mod);
}
bool LDAPModList::empty ( ) const
Returns:
true, if the ModList contains no Operations

Definition at line 42 of file LDAPModList.cpp.

                              {
    return m_modList.empty();
}
Returns:
number of Modifications in the ModList

Definition at line 46 of file LDAPModList.cpp.

                                     {
    return m_modList.size();
}

Translates the list to a 0-terminated array of LDAPMod-structures as needed by the C-API.

Definition at line 29 of file LDAPModList.cpp.

                                     {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPModList::toLDAPModArray()" << endl);
    LDAPMod **ret = (LDAPMod**) malloc(
                  (m_modList.size()+1) * sizeof(LDAPMod*));
    ret[m_modList.size()]=0;
    LDAPModList::ListType::const_iterator i;
    int j=0;
    for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
           ret[j]=i->toLDAPMod();
    }
    return ret;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 55 of file LDAPModList.h.


The documentation for this class was generated from the following files: