]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPEntry.h
Merge remote branch 'origin/mdb.master'
[openldap] / contrib / ldapc++ / src / LDAPEntry.h
index a385b177180da6cd482913a898862d1eecb2ad12..c61022f28a20b9714983ed95c4af4fbf2c2379a1 100644 (file)
@@ -1,5 +1,6 @@
+// $OpenLDAP$
 /*
- * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2011 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -30,7 +31,7 @@ class LDAPEntry{
          * @param attrs The attributes for the new entry.
          */
         LDAPEntry(const std::string& dn=std::string(), 
-                const LDAPAttributeList *attrs=new LDAPAttributeList());
+                const LDAPAttributeList *attrs=0);
 
         /**
          * Used internally only.
@@ -44,7 +45,12 @@ class LDAPEntry{
          * Destructor
          */
         ~LDAPEntry();
-        
+
+        /**
+         * Assignment operator
+         */
+        LDAPEntry& operator=(const LDAPEntry& from);
+
         /**
          * Sets the DN-attribute.
          * @param dn: The new DN for the entry.
@@ -72,6 +78,13 @@ class LDAPEntry{
          * @param attr The attribute to add to the list.
          */
         void addAttribute(const LDAPAttribute& attr);
+        
+        /**
+         * Deletes all values of an Attribute from the list of Attributes 
+         * (simple wrapper around LDAPAttributeList::delAttribute() ).
+         * @param type The attribute to delete.
+         */
+        void delAttribute(const std::string& type);
 
         /**
          * Replace an Attribute in the List of Attributes (simple wrapper