]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/LDAPModList.cpp
Initial check of the LDAP C++ SDK written by Ralf Haferkamp <rhafer@suse.de>
[openldap] / contrib / ldapc++ / src / LDAPModList.cpp
1 /*
2  * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6 // $Id: LDAPModList.cpp,v 1.3 2000/08/31 17:43:49 rhafer Exp $
7
8 #include "LDAPModList.h"
9
10 LDAPModList::LDAPModList(){
11 }
12
13 LDAPModList::LDAPModList(const LDAPModList&){
14 }
15
16 void LDAPModList::addModification(const LDAPModification &mod){
17         m_modList.push_back(mod);
18 }
19
20 LDAPMod** LDAPModList::toLDAPModArray(){
21         LDAPMod **ret = new LDAPMod*[m_modList.size()+1];
22         ret[m_modList.size()]=0;
23         ModList::const_iterator i;
24         int j=0;
25         for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
26                 ret[j]=i->toLDAPMod();
27         }
28         return ret;
29 }