]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/LDAPAttributeList.h
0a6f64cb6d029398d98d6fab469e9e22e792d863
[openldap] / contrib / ldapc++ / src / LDAPAttributeList.h
1 /*
2  * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6
7 #ifndef LDAP_ATTRIBUTE_LIST_H
8 #define LDAP_ATTRIBUTE_LIST_H
9
10 #include <list>
11 class LDAPAttribute;
12 class LDAPAsynConnection;
13 class LDAPMsg;
14
15 typedef list<LDAPAttribute> AttrList;
16
17 class LDAPAttributeList{
18     typedef AttrList::const_iterator const_iterator;
19
20         private :
21                 AttrList m_attrs;
22
23         public :
24                 LDAPAttributeList(const LDAPAttributeList& al);
25         
26         /*!
27          * @throws LDAPException if msg does not contain an entry
28          */
29                 LDAPAttributeList(const LDAPAsynConnection *ld, LDAPMessage *msg);
30                 LDAPAttributeList();
31         virtual ~LDAPAttributeList();
32
33         size_t size() const;
34         const_iterator begin() const;
35         const_iterator end() const;
36                 void addAttribute(const LDAPAttribute& attr);
37                 LDAPMod** toLDAPModArray() const;
38                 
39                 friend ostream& operator << (ostream& s, const LDAPAttributeList& al);
40 };
41 #endif // LDAP_ATTRIBUTE_LIST_H
42