diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:23:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:23:53 +0000 |
commit | c000cad09d0b54c455c99271bfb996c2dfe13073 (patch) | |
tree | e47ca809ed512d7fb43ec3d555753b1b658e9819 /contrib/ldapc++/src/LDAPUrlList.cpp | |
parent | Initial commit. (diff) | |
download | openldap-c000cad09d0b54c455c99271bfb996c2dfe13073.tar.xz openldap-c000cad09d0b54c455c99271bfb996c2dfe13073.zip |
Adding upstream version 2.4.47+dfsg.upstream/2.4.47+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/ldapc++/src/LDAPUrlList.cpp')
-rw-r--r-- | contrib/ldapc++/src/LDAPUrlList.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/contrib/ldapc++/src/LDAPUrlList.cpp b/contrib/ldapc++/src/LDAPUrlList.cpp new file mode 100644 index 0000000..377eaca --- /dev/null +++ b/contrib/ldapc++/src/LDAPUrlList.cpp @@ -0,0 +1,57 @@ +// $OpenLDAP$ +/* + * Copyright 2000-2018 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); +} + |