2000-10-03 14:50:44 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
|
|
|
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef LDAP_REFERENCE_LIST_H
|
|
|
|
|
#define LDAP_REFERENCE_LIST_H
|
|
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
|
|
class LDAPSearchReference;
|
|
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
2002-04-23 11:28:11 -04:00
|
|
|
* Container class for storing a list of Search References
|
2001-02-19 06:34:28 -05:00
|
|
|
*
|
|
|
|
|
* Used internally only by LDAPSearchResults
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
class LDAPReferenceList{
|
2004-02-03 12:11:17 -05:00
|
|
|
typedef std::list<LDAPSearchReference> 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
|
|
|
/**
|
2002-04-23 11:28:11 -04:00
|
|
|
* Constructs an empty list.
|
2001-02-19 06:34:28 -05:00
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
LDAPReferenceList();
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Copy-constructor
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
LDAPReferenceList(const LDAPReferenceList& rl);
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Destructor
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
~LDAPReferenceList();
|
|
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
|
|
|
|
* @return The number of LDAPSearchReference-objects that are
|
|
|
|
|
* currently stored in this 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 LDAPSearchReference-objects
|
|
|
|
|
* currently stored in this list.
|
|
|
|
|
*/
|
|
|
|
|
bool empty() const;
|
|
|
|
|
|
2001-02-19 06:34:28 -05:00
|
|
|
/**
|
|
|
|
|
* @return A iterator that points 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 A iterator that points to the element after the last
|
|
|
|
|
* element of the list.
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
const_iterator end() const;
|
2001-02-19 06:34:28 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds one element to the end of the list.
|
|
|
|
|
* @param e The LDAPSearchReference to add to the list.
|
|
|
|
|
*/
|
2000-10-03 14:50:44 -04:00
|
|
|
void addReference(const LDAPSearchReference& e);
|
|
|
|
|
|
|
|
|
|
private:
|
2004-02-03 12:11:17 -05:00
|
|
|
ListType m_refs;
|
2000-10-03 14:50:44 -04:00
|
|
|
};
|
|
|
|
|
#endif // LDAP_REFERENCE_LIST_H
|
|
|
|
|
|