ldapsdk
0.0.1
|
This container class is used to store multiple LDAPAttribute-objects. More...
#include <LDAPAttributeList.h>
Public Types | |
typedef ListType::const_iterator | const_iterator |
typedef ListType::iterator | iterator |
Public Member Functions | |
LDAPAttributeList (const LDAPAttributeList &al) | |
Copy-constructor. More... | |
LDAPAttributeList (const LDAPAsynConnection *ld, LDAPMessage *msg) | |
For internal use only. More... | |
LDAPAttributeList () | |
Constructs an empty list. More... | |
virtual | ~LDAPAttributeList () |
Destructor. More... | |
size_t | size () const |
bool | empty () const |
const_iterator | begin () const |
const_iterator | end () const |
const LDAPAttribute * | getAttributeByName (const std::string &name) const |
Get an Attribute by its AttributeType. More... | |
void | addAttribute (const LDAPAttribute &attr) |
Adds one element to the end of the list. More... | |
void | delAttribute (const std::string &type) |
Deletes all values of an Attribute for the list. More... | |
void | replaceAttribute (const LDAPAttribute &attr) |
Replace an Attribute in the List. More... | |
LDAPMod ** | toLDAPModArray () const |
Translates the list of Attributes to a 0-terminated array of LDAPMod-structures as needed by the C-API. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &s, const LDAPAttributeList &al) |
This method can be used to dump the data of a LDAPResult-Object. More... | |
This container class is used to store multiple LDAPAttribute-objects.
typedef ListType::const_iterator LDAPAttributeList::const_iterator |
typedef ListType::iterator LDAPAttributeList::iterator |
LDAPAttributeList::LDAPAttributeList | ( | const LDAPAttributeList & | al | ) |
Copy-constructor.
References DEBUG, and LDAP_DEBUG_CONSTRUCT.
LDAPAttributeList::LDAPAttributeList | ( | const LDAPAsynConnection * | ld, |
LDAPMessage * | msg | ||
) |
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
References DEBUG, LDAPAsynConnection::getSessionHandle(), and LDAP_DEBUG_CONSTRUCT.
LDAPAttributeList::LDAPAttributeList | ( | ) |
Constructs an empty list.
References DEBUG, and LDAP_DEBUG_CONSTRUCT.
|
virtual |
Destructor.
References DEBUG, and LDAP_DEBUG_DESTROY.
void LDAPAttributeList::addAttribute | ( | const LDAPAttribute & | attr | ) |
Adds one element to the end of the list.
attr | The attribute to add to the list. |
References StringList::begin(), DEBUG, StringList::end(), LDAPAttribute::getName(), LDAPAttribute::getValues(), LDAP_DEBUG_PARAMETER, LDAP_DEBUG_TRACE, and nocase_compare().
Referenced by LdifReader::getEntryRecord().
LDAPAttributeList::const_iterator LDAPAttributeList::begin | ( | ) | const |
References DEBUG, and LDAP_DEBUG_TRACE.
Referenced by LdifWriter::writeRecord().
void LDAPAttributeList::delAttribute | ( | const std::string & | type | ) |
Deletes all values of an Attribute for the list.
type | The attribute type to be deleted. |
References DEBUG, LDAP_DEBUG_PARAMETER, LDAP_DEBUG_TRACE, and nocase_compare().
Referenced by LdifReader::getEntryRecord().
bool LDAPAttributeList::empty | ( | ) | const |
References DEBUG, and LDAP_DEBUG_TRACE.
LDAPAttributeList::const_iterator LDAPAttributeList::end | ( | ) | const |
References DEBUG, and LDAP_DEBUG_TRACE.
const LDAPAttribute * LDAPAttributeList::getAttributeByName | ( | const std::string & | name | ) | const |
Get an Attribute by its AttributeType.
name | The name of the Attribute to look for |
References DEBUG, LDAP_DEBUG_PARAMETER, LDAP_DEBUG_TRACE, and nocase_compare().
Referenced by LdifReader::getEntryRecord().
void LDAPAttributeList::replaceAttribute | ( | const LDAPAttribute & | attr | ) |
Replace an Attribute in the List.
attr | The attribute to add to the list. |
References DEBUG, LDAPAttribute::getName(), LDAP_DEBUG_PARAMETER, and LDAP_DEBUG_TRACE.
size_t LDAPAttributeList::size | ( | ) | const |
References DEBUG, and LDAP_DEBUG_TRACE.
LDAPMod ** LDAPAttributeList::toLDAPModArray | ( | ) | const |
Translates the list of Attributes to a 0-terminated array of LDAPMod-structures as needed by the C-API.
References DEBUG, and LDAP_DEBUG_TRACE.
Referenced by LDAPAddRequest::sendRequest().
|
friend |
This method can be used to dump the data of a LDAPResult-Object.
It is only useful for debugging purposes at the moment