00001 /* 00002 * Copyright 2000-2002, OpenLDAP Foundation, All Rights Reserved. 00003 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file 00004 */ 00005 00006 00007 #ifndef LDAP_ATTRIBUTE_LIST_H 00008 #define LDAP_ATTRIBUTE_LIST_H 00009 00010 #include <ldap.h> 00011 #include <list> 00012 #include <string> 00013 00014 class LDAPAttribute; 00015 class LDAPAsynConnection; 00016 class LDAPMsg; 00017 00021 class LDAPAttributeList{ 00022 typedef std::list<LDAPAttribute> ListType; 00023 00024 private : 00025 ListType m_attrs; 00026 00027 public : 00028 typedef ListType::const_iterator const_iterator; 00029 typedef ListType::iterator iterator; 00030 00031 00035 LDAPAttributeList(const LDAPAttributeList& al); 00036 00044 LDAPAttributeList(const LDAPAsynConnection *ld, LDAPMessage *msg); 00045 00049 LDAPAttributeList(); 00050 00054 virtual ~LDAPAttributeList(); 00055 00060 size_t size() const; 00061 00066 bool empty() const; 00067 00071 const_iterator begin() const; 00072 00077 const_iterator end() const; 00078 00085 const LDAPAttribute* getAttributeByName(const std::string& name) const; 00086 00091 void addAttribute(const LDAPAttribute& attr); 00092 00097 void replaceAttribute(const LDAPAttribute& attr); 00098 00103 LDAPMod** toLDAPModArray() const; 00104 00109 friend std::ostream& operator << (std::ostream& s, 00110 const LDAPAttributeList& al); 00111 }; 00112 00113 #endif // LDAP_ATTRIBUTE_LIST_H 00114
1.5.5