Back to index

openldap  2.4.31
Public Types | Public Member Functions | Private Types | Private Attributes
LDAPUrlList Class Reference

This container class is used to store multiple LDAPUrl-objects. More...

#include <LDAPUrlList.h>

Collaboration diagram for LDAPUrlList:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ListType::const_iterator const_iterator

Public Member Functions

 LDAPUrlList ()
 Constructs an empty list.
 LDAPUrlList (const LDAPUrlList &urls)
 Copy-constructor.
 LDAPUrlList (char **urls)
 For internal use only.
 ~LDAPUrlList ()
 Destructor.
size_t size () const
bool empty () const
const_iterator begin () const
const_iterator end () const
void add (const LDAPUrl &url)
 Adds one element to the end of the list.

Private Types

typedef std::list< LDAPUrlListType

Private Attributes

ListType m_urls

Detailed Description

This container class is used to store multiple LDAPUrl-objects.

Definition at line 16 of file LDAPUrlList.h.


Member Typedef Documentation

typedef ListType::const_iterator LDAPUrlList::const_iterator

Definition at line 20 of file LDAPUrlList.h.

Definition at line 17 of file LDAPUrlList.h.


Constructor & Destructor Documentation

Constructs an empty list.

Definition at line 13 of file LDAPUrlList.cpp.

                        {
    DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
    m_urls=LDAPUrlList::ListType();
}

Copy-constructor.

Definition at line 18 of file LDAPUrlList.cpp.

                                               {
    DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList(&)" << endl);
    m_urls = urls.m_urls;
}
LDAPUrlList::LDAPUrlList ( char **  urls)

For internal use only.

This constructor is used by the library internally to create a std::list of URLs from a array of C-strings that was return by the C-API

Definition at line 24 of file LDAPUrlList.cpp.

                                  {
    DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
    char** i;
    assert(url);
    for(i = url; *i != 0; i++){
        add(LDAPUrl(*i));
    }
}

Destructor.

Definition at line 33 of file LDAPUrlList.cpp.

                         {
    DEBUG(LDAP_DEBUG_DESTROY," LDAPUrlList::~LDAPUrlList()" << endl);
    m_urls.clear();
}

Member Function Documentation

Adds one element to the end of the list.

Parameters:
attrThe attribute to add to the list.

Definition at line 54 of file LDAPUrlList.cpp.

                                       {
    m_urls.push_back(url);
}
Returns:
A iterator that points to the first element of the list.

Definition at line 46 of file LDAPUrlList.cpp.

                                                  {
    return m_urls.begin();
}

Here is the caller graph for this function:

bool LDAPUrlList::empty ( ) const
Returns:
true if there are zero LDAPUrl-objects currently stored in this list.

Definition at line 42 of file LDAPUrlList.cpp.

                             {
    return m_urls.empty();
}
Returns:
A iterator that points to the element after the last element of the list.

Definition at line 50 of file LDAPUrlList.cpp.

                                                {
    return m_urls.end();
}

Here is the caller graph for this function:

size_t LDAPUrlList::size ( ) const
Returns:
The number of LDAPUrl-objects that are currently stored in this list.

Definition at line 38 of file LDAPUrlList.cpp.

                              {
    return m_urls.size();
}

Member Data Documentation

Definition at line 76 of file LDAPUrlList.h.


The documentation for this class was generated from the following files: