Plan 9 from Bell Labs’s /usr/web/sources/contrib/lucio/pub/openldap/contrib/ldapc++/src/LDAPUrlList.cpp

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/*
 * Copyright 2000-2002 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);
}


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.