blob: e6d45f7ef25b25f4cc66b2ae10ba36b8e882586b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// $OpenLDAP$
/*
* Copyright 2000-2021 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "LDAPUrlList.h"
#include <assert.h>
#include "debug.h"
using namespace std;
LDAPUrlList::LDAPUrlList(){
DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
m_urls=LDAPUrlList::ListType();
}
LDAPUrlList::LDAPUrlList(const LDAPUrlList& urls){
DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList(&)" << endl);
m_urls = urls.m_urls;
}
LDAPUrlList::LDAPUrlList(char** url){
DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
char** i;
assert(url);
for(i = url; *i != 0; i++){
add(LDAPUrl(*i));
}
}
LDAPUrlList::~LDAPUrlList(){
DEBUG(LDAP_DEBUG_DESTROY," LDAPUrlList::~LDAPUrlList()" << endl);
m_urls.clear();
}
size_t LDAPUrlList::size() const{
return m_urls.size();
}
bool LDAPUrlList::empty() const{
return m_urls.empty();
}
LDAPUrlList::const_iterator LDAPUrlList::begin() const{
return m_urls.begin();
}
LDAPUrlList::const_iterator LDAPUrlList::end() const{
return m_urls.end();
}
void LDAPUrlList::add(const LDAPUrl& url){
m_urls.push_back(url);
}
|