]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/LDAPModList.h
- some code cleanups
[openldap] / contrib / ldapc++ / src / LDAPModList.h
1 /*
2  * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6
7 #ifndef LDAP_MOD_LIST_H
8 #define LDAP_MOD_LIST_H
9
10 #include <ldap.h>
11 #include <list>
12 #include <LDAPModification.h>
13
14 typedef std::list<LDAPModification> ModList;
15
16 /**
17  * This container class is used to store multiple LDAPModification-objects.
18  */
19 class LDAPModList{
20
21         public : 
22         /**
23          * Constructs an empty list.
24          */   
25                 LDAPModList();
26                 
27         /**
28          * Copy-constructor
29          */
30         LDAPModList(const LDAPModList&);
31
32         /**
33          * Adds one element to the end of the list.
34          * @param mod The LDAPModification to add to the std::list.
35          */
36                 void addModification(const LDAPModification &mod);
37
38         /**
39          * Translates the list to a 0-terminated array of
40          * LDAPMod-structures as needed by the C-API
41          */
42         LDAPMod** toLDAPModArray();
43
44         private : 
45                 ModList m_modList;
46 };
47 #endif //LDAP_MOD_LIST_H
48
49