]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPAttributeList.h
- some minor bugfixes
[openldap] / contrib / ldapc++ / src / LDAPAttributeList.h
index 0a6f64cb6d029398d98d6fab469e9e22e792d863..816129336479b5208672c6cf521a19416fbe785f 100644 (file)
@@ -14,6 +14,9 @@ class LDAPMsg;
 
 typedef list<LDAPAttribute> AttrList;
 
+/**
+ * This container class is used to store multiple LDAPAttribute-objects.
+ */
 class LDAPAttributeList{
     typedef AttrList::const_iterator const_iterator;
 
@@ -21,21 +24,64 @@ class LDAPAttributeList{
                AttrList m_attrs;
 
        public :
+
+        /**
+         * Copy-constructor
+         */
                LDAPAttributeList(const LDAPAttributeList& al);
         
-        /*!
-         * @throws LDAPException if msg does not contain an entry
+        /**
+         * For internal use only
+         *
+         * This constructor is used by the library internally to create a
+         * list of attributes from a LDAPMessage-struct that was return by
+         * the C-API
          */
                LDAPAttributeList(const LDAPAsynConnection *ld, LDAPMessage *msg);
+
+        /**
+         * Constructs an empty list.
+         */   
                LDAPAttributeList();
+
+        /**
+         * Destructor
+         */
         virtual ~LDAPAttributeList();
 
+        /**
+         * @return The number of LDAPAttribute-objects that are currently
+         * stored in this list.
+         */
         size_t size() const;
+
+        /**
+         * @return A iterator that points to the first element of the list.
+         */
         const_iterator begin() const;
+        
+        /**
+         * @return A iterator that points to the element after the last
+         * element of the list.
+         */
         const_iterator end() const;
+
+        /**
+         * Adds one element to the end of the list.
+         * @param attr The attribute to add to the list.
+         */
                void addAttribute(const LDAPAttribute& attr);
+
+        /**
+         * Translates the list of Attributes to a 0-terminated array of
+         * LDAPMod-structures as needed by the C-API
+         */
                LDAPMod** toLDAPModArray() const;
                
+        /**
+         * This method can be used to dump the data of a LDAPResult-Object.
+         * It is only useful for debugging purposes at the moment
+         */
                friend ostream& operator << (ostream& s, const LDAPAttributeList& al);
 };
 #endif // LDAP_ATTRIBUTE_LIST_H