openldap/contrib/ldapc++/src/LDAPModList.cpp
Kurt Zeilenga 84d0e26234 Initial check of the LDAP C++ SDK written by Ralf Haferkamp <rhafer@suse.de>
Copyright notices have been adjusted per on-file OpenLDAP Contributor
Assignment Agreement.
2000-09-01 18:46:32 +00:00

29 lines
643 B
C++

/*
* Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
// $Id: LDAPModList.cpp,v 1.3 2000/08/31 17:43:49 rhafer Exp $
#include "LDAPModList.h"
LDAPModList::LDAPModList(){
}
LDAPModList::LDAPModList(const LDAPModList&){
}
void LDAPModList::addModification(const LDAPModification &mod){
m_modList.push_back(mod);
}
LDAPMod** LDAPModList::toLDAPModArray(){
LDAPMod **ret = new LDAPMod*[m_modList.size()+1];
ret[m_modList.size()]=0;
ModList::const_iterator i;
int j=0;
for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
ret[j]=i->toLDAPMod();
}
return ret;
}