]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPEntry.h
Entry rwlock is no longer needed as concurrency is managed
[openldap] / contrib / ldapc++ / src / LDAPEntry.h
index 918f533e8c014fe876db1d7be246d9740545aed6..ebd4153f05c29be6cfbeaf6f35624ec5e633bdcd 100644 (file)
@@ -8,25 +8,73 @@
 #define LDAP_ENTRY_H
 #include <ldap.h>
 
-#include "LDAPAsynConnection.h"
-#include "LDAPAttributeList.h"
+#include <LDAPAsynConnection.h>
+#include <LDAPAttributeList.h>
 
+/**
+ * This class is used to store every kind of LDAP Entry.
+ */
 class LDAPEntry{
 
        public :
+        /**
+         * Copy-constructor
+         */
                LDAPEntry(const LDAPEntry& entry);
-               LDAPEntry(const string& dn=string(), 
+
+        /**
+         * Constructs a new entry (also used as standard constructor).
+         *
+         * @param dn    The Distinguished Name for the new entry.
+         * @param attrs The attributes for the new entry.
+         */
+               LDAPEntry(const std::string& dn=std::string(), 
                 const LDAPAttributeList *attrs=new LDAPAttributeList());
+
+        /**
+         * Used internally only.
+         *
+         * The constructor is used internally to create a LDAPEntry from
+         * the C-API's data structurs.
+         */ 
                LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg);
+
+        /**
+         * Destructor
+         */
                ~LDAPEntry();
-               void setDN(const string& dn);
+        
+        /**
+         * Sets the DN-attribute.
+         * @param dn: The new DN for the entry.
+         */
+               void setDN(const std::string& dn);
+
+        /**
+         * Sets the attributes of the entry.
+         * @param attr: A pointer to a std::list of the new attributes.
+         */
                void setAttributes(LDAPAttributeList *attrs);
-               const string getDN() const ;
+
+        /**
+         * @returns The current DN of the entry.
+         */
+               const std::string getDN() const ;
+
+        /**
+         * @returns A const pointer to the attributes of the entry.  
+         */
                const LDAPAttributeList* getAttributes() const;
-               friend ostream& operator << (ostream& s, const LDAPEntry& le);
+
+        /**
+         * This method can be used to dump the data of a LDAPResult-Object.
+         * It is only useful for debugging purposes at the moment
+         */
+               friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le);
        
     private :
+
                LDAPAttributeList *m_attrs;
-               string m_dn;
+               std::string m_dn;
 };
 #endif  //LDAP_ENTRY_H