2008-03-28 07:05:10 -04:00
|
|
|
// $OpenLDAP$
|
2000-10-03 14:50:44 -04:00
|
|
|
/*
|
2016-01-29 14:32:05 -05:00
|
|
|
* Copyright 2000-2016 The OpenLDAP Foundation, All Rights Reserved.
|
2000-10-03 14:50:44 -04:00
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef LDAP_ENTRY_LIST_H
|
|
|
|
|
#define LDAP_ENTRY_LIST_H
|
|
|
|
|
|
2011-05-03 05:21:07 -04:00
|
|
|
#include <cstdio>
|
2000-10-03 14:50:44 -04:00
|
|
|
#include <list>
|
|
|
|
|
|
|
|
|
|
class LDAPEntry;
|
|
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
|
|
|
|
* For internal use only.
|
|
|
|
|
*
|
2001-09-28 12:39:58 -04:00
|
|
|
* This class is used by LDAPSearchResults to store a std::list of
|
2001-02-19 06:34:28 -05:00
|
|
|
* LDAPEntry-Objects
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
class LDAPEntryList{
|
2004-02-03 12:11:17 -05:00
|
|
|
typedef std::list<LDAPEntry> ListType;
|
|
|
|
|
|
2000-10-03 14:50:44 -04:00
|
|
|
public:
|
2004-02-03 12:11:17 -05:00
|
|
|
typedef ListType::const_iterator const_iterator;
|
2001-03-15 06:07:58 -05:00
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
|
|
|
|
* Copy-Constructor
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
LDAPEntryList(const LDAPEntryList& el);
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Default-Constructor
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
LDAPEntryList();
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Destructor
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
~LDAPEntryList();
|
|
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
|
|
|
|
* @return The number of entries currently stored in the list.
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
size_t size() const;
|
2001-02-19 06:34:28 -05:00
|
|
|
|
2001-09-07 13:43:55 -04:00
|
|
|
/**
|
|
|
|
|
* @return true if there are zero entries currently stored in the list.
|
|
|
|
|
*/
|
|
|
|
|
bool empty() const;
|
|
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
|
|
|
|
* @return An iterator pointing to the first element of the list.
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
const_iterator begin() const;
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return An iterator pointing to the end of the list
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
const_iterator end() const;
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds an Entry to the end of the list.
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
void addEntry(const LDAPEntry& e);
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
private:
|
2004-02-03 12:11:17 -05:00
|
|
|
ListType m_entries;
|
2000-10-03 14:50:44 -04:00
|
|
|
};
|
|
|
|
|
#endif // LDAP_ENTRY_LIST_H
|