2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7 #include "LDAPModList.h"
10 LDAPModList::LDAPModList(){
11 DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModList::LDAPModList()" << endl);
14 LDAPModList::LDAPModList(const LDAPModList& ml){
15 DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModList::LDAPModList(&)" << endl);
16 m_modList=ml.m_modList;
19 void LDAPModList::addModification(const LDAPModification &mod){
20 DEBUG(LDAP_DEBUG_TRACE,"LDAPModList::addModification()" << endl);
21 m_modList.push_back(mod);
24 LDAPMod** LDAPModList::toLDAPModArray(){
25 DEBUG(LDAP_DEBUG_TRACE,"LDAPModList::toLDAPModArray()" << endl);
26 LDAPMod **ret = new LDAPMod*[m_modList.size()+1];
27 ret[m_modList.size()]=0;
28 ModList::const_iterator i;
30 for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
31 ret[j]=i->toLDAPMod();