Back to index

openldap  2.4.31
LDAPUrlList.cpp
Go to the documentation of this file.
00001 // $OpenLDAP$
00002 /*
00003  * Copyright 2000-2012 The OpenLDAP Foundation, All Rights Reserved.
00004  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
00005  */
00006 
00007 #include "LDAPUrlList.h"
00008 #include <assert.h>
00009 #include "debug.h"
00010 
00011 using namespace std;
00012 
00013 LDAPUrlList::LDAPUrlList(){
00014     DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
00015     m_urls=LDAPUrlList::ListType();
00016 }
00017 
00018 LDAPUrlList::LDAPUrlList(const LDAPUrlList& urls){
00019     DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList(&)" << endl);
00020     m_urls = urls.m_urls;
00021 }
00022 
00023 
00024 LDAPUrlList::LDAPUrlList(char** url){
00025     DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
00026     char** i;
00027     assert(url);
00028     for(i = url; *i != 0; i++){
00029         add(LDAPUrl(*i));
00030     }
00031 }
00032 
00033 LDAPUrlList::~LDAPUrlList(){
00034     DEBUG(LDAP_DEBUG_DESTROY," LDAPUrlList::~LDAPUrlList()" << endl);
00035     m_urls.clear();
00036 }
00037 
00038 size_t LDAPUrlList::size() const{
00039     return m_urls.size();
00040 }
00041 
00042 bool LDAPUrlList::empty() const{
00043     return m_urls.empty();
00044 }
00045 
00046 LDAPUrlList::const_iterator LDAPUrlList::begin() const{
00047     return m_urls.begin();
00048 }
00049 
00050 LDAPUrlList::const_iterator LDAPUrlList::end() const{
00051     return m_urls.end();
00052 }
00053 
00054 void LDAPUrlList::add(const LDAPUrl& url){
00055     m_urls.push_back(url);
00056 }
00057