LDAPEntry Class Reference

This class is used to store every kind of LDAP Entry. More...

#include <LDAPEntry.h>

List of all members.

Public Member Functions

 LDAPEntry (const LDAPEntry &entry)
 Copy-constructor.
 LDAPEntry (const std::string &dn=std::string(), const LDAPAttributeList *attrs=0)
 Constructs a new entry (also used as standard constructor).
 LDAPEntry (const LDAPAsynConnection *ld, LDAPMessage *msg)
 Used internally only.
 ~LDAPEntry ()
 Destructor.
LDAPEntryoperator= (const LDAPEntry &from)
 Assignment operator.
void setDN (const std::string &dn)
 Sets the DN-attribute.
void setAttributes (LDAPAttributeList *attrs)
 Sets the attributes of the entry.
const LDAPAttributegetAttributeByName (const std::string &name) const
 Get an Attribute by its AttributeType (simple wrapper around LDAPAttributeList::getAttributeByName() ).
void addAttribute (const LDAPAttribute &attr)
 Adds one Attribute to the List of Attributes (simple wrapper around LDAPAttributeList::addAttribute() ).
void delAttribute (const std::string &type)
 Deletes all values of an Attribute from the list of Attributes (simple wrapper around LDAPAttributeList::delAttribute() ).
void replaceAttribute (const LDAPAttribute &attr)
 Replace an Attribute in the List of Attributes (simple wrapper around LDAPAttributeList::replaceAttribute() ).
const std::string & getDN () const
const LDAPAttributeListgetAttributes () const

Friends

std::ostream & operator<< (std::ostream &s, const LDAPEntry &le)
 This method can be used to dump the data of a LDAPResult-Object.

Detailed Description

This class is used to store every kind of LDAP Entry.


Constructor & Destructor Documentation

LDAPEntry::LDAPEntry ( const LDAPEntry entry  ) 

Copy-constructor.

References DEBUG, and LDAP_DEBUG_CONSTRUCT.

LDAPEntry::LDAPEntry ( const std::string &  dn = std::string(),
const LDAPAttributeList attrs = 0 
)

Constructs a new entry (also used as standard constructor).

Parameters:
dn The Distinguished Name for the new entry.
attrs The attributes for the new entry.
LDAPEntry::LDAPEntry ( const LDAPAsynConnection ld,
LDAPMessage *  msg 
)

Used internally only.

The constructor is used internally to create a LDAPEntry from the C-API's data structurs.

References DEBUG, LDAPAsynConnection::getSessionHandle(), and LDAP_DEBUG_CONSTRUCT.

LDAPEntry::~LDAPEntry (  ) 

Destructor.

References DEBUG, and LDAP_DEBUG_DESTROY.


Member Function Documentation

void LDAPEntry::addAttribute ( const LDAPAttribute attr  ) 

Adds one Attribute to the List of Attributes (simple wrapper around LDAPAttributeList::addAttribute() ).

Parameters:
attr The attribute to add to the list.

References LDAPAttributeList::addAttribute().

void LDAPEntry::delAttribute ( const std::string &  type  ) 

Deletes all values of an Attribute from the list of Attributes (simple wrapper around LDAPAttributeList::delAttribute() ).

Parameters:
type The attribute to delete.

References LDAPAttributeList::delAttribute().

const LDAPAttribute * LDAPEntry::getAttributeByName ( const std::string &  name  )  const

Get an Attribute by its AttributeType (simple wrapper around LDAPAttributeList::getAttributeByName() ).

Parameters:
name The name of the Attribute to look for
Returns:
a pointer to the LDAPAttribute with the AttributeType "name" or 0, if there is no Attribute of that Type

References LDAPAttributeList::getAttributeByName().

const LDAPAttributeList * LDAPEntry::getAttributes (  )  const
Returns:
A const pointer to the attributes of the entry.

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPAddRequest::sendRequest(), and LdifWriter::writeRecord().

const string & LDAPEntry::getDN (  )  const
Returns:
The current DN of the entry.

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPAddRequest::sendRequest(), and LdifWriter::writeRecord().

LDAPEntry & LDAPEntry::operator= ( const LDAPEntry from  ) 

Assignment operator.

void LDAPEntry::replaceAttribute ( const LDAPAttribute attr  ) 

Replace an Attribute in the List of Attributes (simple wrapper around LDAPAttributeList::replaceAttribute() ).

Parameters:
attr The attribute to add to the list.

References LDAPAttributeList::replaceAttribute().

void LDAPEntry::setAttributes ( LDAPAttributeList attrs  ) 

Sets the attributes of the entry.

Parameters:
attr,: A pointer to a std::list of the new attributes.

References DEBUG, LDAP_DEBUG_PARAMETER, and LDAP_DEBUG_TRACE.

Referenced by LdifReader::getEntryRecord().

void LDAPEntry::setDN ( const std::string &  dn  ) 

Sets the DN-attribute.

Parameters:
dn,: The new DN for the entry.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const LDAPEntry le 
) [friend]

This method can be used to dump the data of a LDAPResult-Object.

It is only useful for debugging purposes at the moment


The documentation for this class was generated from the following files:
Generated on Mon Jul 5 13:45:11 2010 for ldapsdk by  doxygen 1.6.3