mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Declare ListType inside class definition
This commit is contained in:
parent
9f3b0d60f9
commit
25c9bb33c7
11 changed files with 32 additions and 33 deletions
|
|
@ -90,7 +90,7 @@ const LDAPAttribute* LDAPAttributeList::getAttributeByName(
|
||||||
DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::getAttributeByName()" << endl);
|
DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::getAttributeByName()" << endl);
|
||||||
DEBUG(LDAP_DEBUG_TRACE | LDAP_DEBUG_PARAMETER,
|
DEBUG(LDAP_DEBUG_TRACE | LDAP_DEBUG_PARAMETER,
|
||||||
" name:" << name << endl);
|
" name:" << name << endl);
|
||||||
AttrList::const_iterator i;
|
LDAPAttributeList::const_iterator i;
|
||||||
for( i = m_attrs.begin(); i != m_attrs.end(); i++){
|
for( i = m_attrs.begin(); i != m_attrs.end(); i++){
|
||||||
const std::string& tmpType = i->getName();
|
const std::string& tmpType = i->getName();
|
||||||
if(name.size() == tmpType.size()){
|
if(name.size() == tmpType.size()){
|
||||||
|
|
@ -112,7 +112,7 @@ void LDAPAttributeList::addAttribute(const LDAPAttribute& attr){
|
||||||
const std::string::size_type attrLen = attrType.size();
|
const std::string::size_type attrLen = attrType.size();
|
||||||
std::string::size_type tmpAttrLen = 0;
|
std::string::size_type tmpAttrLen = 0;
|
||||||
bool done=false;
|
bool done=false;
|
||||||
AttrList::iterator i;
|
LDAPAttributeList::iterator i;
|
||||||
for( i=m_attrs.begin(); i != m_attrs.end(); i++ ){
|
for( i=m_attrs.begin(); i != m_attrs.end(); i++ ){
|
||||||
const std::string tmpAttrType = i->getName();
|
const std::string tmpAttrType = i->getName();
|
||||||
tmpAttrLen = tmpAttrType.size();
|
tmpAttrLen = tmpAttrType.size();
|
||||||
|
|
@ -141,7 +141,7 @@ void LDAPAttributeList::addAttribute(const LDAPAttribute& attr){
|
||||||
LDAPMod** LDAPAttributeList::toLDAPModArray() const{
|
LDAPMod** LDAPAttributeList::toLDAPModArray() const{
|
||||||
DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::toLDAPModArray()" << endl);
|
DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::toLDAPModArray()" << endl);
|
||||||
LDAPMod **ret = (LDAPMod**) malloc((m_attrs.size()+1) * sizeof(LDAPMod*));
|
LDAPMod **ret = (LDAPMod**) malloc((m_attrs.size()+1) * sizeof(LDAPMod*));
|
||||||
AttrList::const_iterator i;
|
LDAPAttributeList::const_iterator i;
|
||||||
int j=0;
|
int j=0;
|
||||||
for (i=m_attrs.begin(); i!= m_attrs.end(); i++, j++){
|
for (i=m_attrs.begin(); i!= m_attrs.end(); i++, j++){
|
||||||
ret[j]=i->toLDAPMod();
|
ret[j]=i->toLDAPMod();
|
||||||
|
|
@ -151,7 +151,7 @@ LDAPMod** LDAPAttributeList::toLDAPModArray() const{
|
||||||
}
|
}
|
||||||
|
|
||||||
ostream& operator << (ostream& s, const LDAPAttributeList& al){
|
ostream& operator << (ostream& s, const LDAPAttributeList& al){
|
||||||
AttrList::const_iterator i;
|
LDAPAttributeList::const_iterator i;
|
||||||
for(i=al.m_attrs.begin(); i!=al.m_attrs.end(); i++){
|
for(i=al.m_attrs.begin(); i!=al.m_attrs.end(); i++){
|
||||||
s << *i << "; ";
|
s << *i << "; ";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,18 +15,18 @@ class LDAPAttribute;
|
||||||
class LDAPAsynConnection;
|
class LDAPAsynConnection;
|
||||||
class LDAPMsg;
|
class LDAPMsg;
|
||||||
|
|
||||||
typedef std::list<LDAPAttribute> AttrList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This container class is used to store multiple LDAPAttribute-objects.
|
* This container class is used to store multiple LDAPAttribute-objects.
|
||||||
*/
|
*/
|
||||||
class LDAPAttributeList{
|
class LDAPAttributeList{
|
||||||
|
typedef std::list<LDAPAttribute> ListType;
|
||||||
|
|
||||||
private :
|
private :
|
||||||
AttrList m_attrs;
|
ListType m_attrs;
|
||||||
|
|
||||||
public :
|
public :
|
||||||
typedef AttrList::const_iterator const_iterator;
|
typedef ListType::const_iterator const_iterator;
|
||||||
typedef AttrList::iterator iterator;
|
typedef ListType::iterator iterator;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
class LDAPEntry;
|
class LDAPEntry;
|
||||||
|
|
||||||
typedef std::list<LDAPEntry> EntryList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For internal use only.
|
* For internal use only.
|
||||||
*
|
*
|
||||||
|
|
@ -19,8 +17,10 @@ typedef std::list<LDAPEntry> EntryList;
|
||||||
* LDAPEntry-Objects
|
* LDAPEntry-Objects
|
||||||
*/
|
*/
|
||||||
class LDAPEntryList{
|
class LDAPEntryList{
|
||||||
|
typedef std::list<LDAPEntry> ListType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef EntryList::const_iterator const_iterator;
|
typedef ListType::const_iterator const_iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy-Constructor
|
* Copy-Constructor
|
||||||
|
|
@ -63,6 +63,6 @@ class LDAPEntryList{
|
||||||
void addEntry(const LDAPEntry& e);
|
void addEntry(const LDAPEntry& e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EntryList m_entries;
|
ListType m_entries;
|
||||||
};
|
};
|
||||||
#endif // LDAP_ENTRY_LIST_H
|
#endif // LDAP_ENTRY_LIST_H
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ LDAPMod** LDAPModList::toLDAPModArray(){
|
||||||
LDAPMod **ret = (LDAPMod**) malloc(
|
LDAPMod **ret = (LDAPMod**) malloc(
|
||||||
(m_modList.size()+1) * sizeof(LDAPMod*));
|
(m_modList.size()+1) * sizeof(LDAPMod*));
|
||||||
ret[m_modList.size()]=0;
|
ret[m_modList.size()]=0;
|
||||||
ModList::const_iterator i;
|
LDAPModList::ListType::const_iterator i;
|
||||||
int j=0;
|
int j=0;
|
||||||
for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
|
for (i=m_modList.begin(); i != m_modList.end(); i++ , j++){
|
||||||
ret[j]=i->toLDAPMod();
|
ret[j]=i->toLDAPMod();
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,17 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <LDAPModification.h>
|
#include <LDAPModification.h>
|
||||||
|
|
||||||
typedef std::list<LDAPModification> ModList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This container class is used to store multiple LDAPModification-objects.
|
* This container class is used to store multiple LDAPModification-objects.
|
||||||
*/
|
*/
|
||||||
class LDAPModList{
|
class LDAPModList{
|
||||||
|
typedef std::list<LDAPModification> ListType;
|
||||||
|
|
||||||
public :
|
public :
|
||||||
/**
|
/**
|
||||||
* Constructs an empty list.
|
* Constructs an empty list.
|
||||||
*/
|
*/
|
||||||
LDAPModList();
|
LDAPModList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy-constructor
|
* Copy-constructor
|
||||||
|
|
@ -33,7 +32,7 @@ class LDAPModList{
|
||||||
* Adds one element to the end of the list.
|
* Adds one element to the end of the list.
|
||||||
* @param mod The LDAPModification to add to the std::list.
|
* @param mod The LDAPModification to add to the std::list.
|
||||||
*/
|
*/
|
||||||
void addModification(const LDAPModification &mod);
|
void addModification(const LDAPModification &mod);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates the list to a 0-terminated array of
|
* Translates the list to a 0-terminated array of
|
||||||
|
|
@ -42,7 +41,7 @@ class LDAPModList{
|
||||||
LDAPMod** toLDAPModArray();
|
LDAPMod** toLDAPModArray();
|
||||||
|
|
||||||
private :
|
private :
|
||||||
ModList m_modList;
|
ListType m_modList;
|
||||||
};
|
};
|
||||||
#endif //LDAP_MOD_LIST_H
|
#endif //LDAP_MOD_LIST_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,16 @@
|
||||||
|
|
||||||
class LDAPSearchReference;
|
class LDAPSearchReference;
|
||||||
|
|
||||||
typedef std::list<LDAPSearchReference> RefList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container class for storing a list of Search References
|
* Container class for storing a list of Search References
|
||||||
*
|
*
|
||||||
* Used internally only by LDAPSearchResults
|
* Used internally only by LDAPSearchResults
|
||||||
*/
|
*/
|
||||||
class LDAPReferenceList{
|
class LDAPReferenceList{
|
||||||
|
typedef std::list<LDAPSearchReference> ListType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef RefList::const_iterator const_iterator;
|
typedef ListType::const_iterator const_iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an empty list.
|
* Constructs an empty list.
|
||||||
|
|
@ -66,7 +66,7 @@ class LDAPReferenceList{
|
||||||
void addReference(const LDAPSearchReference& e);
|
void addReference(const LDAPSearchReference& e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RefList m_refs;
|
ListType m_refs;
|
||||||
};
|
};
|
||||||
#endif // LDAP_REFERENCE_LIST_H
|
#endif // LDAP_REFERENCE_LIST_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ using namespace std;
|
||||||
|
|
||||||
LDAPUrlList::LDAPUrlList(){
|
LDAPUrlList::LDAPUrlList(){
|
||||||
DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
|
DEBUG(LDAP_DEBUG_CONSTRUCT," LDAPUrlList::LDAPUrlList()" << endl);
|
||||||
m_urls=UrlList();
|
m_urls=LDAPUrlList::ListType();
|
||||||
}
|
}
|
||||||
|
|
||||||
LDAPUrlList::LDAPUrlList(const LDAPUrlList& urls){
|
LDAPUrlList::LDAPUrlList(const LDAPUrlList& urls){
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <LDAPUrl.h>
|
#include <LDAPUrl.h>
|
||||||
|
|
||||||
typedef std::list<LDAPUrl> UrlList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This container class is used to store multiple LDAPUrl-objects.
|
* This container class is used to store multiple LDAPUrl-objects.
|
||||||
*/
|
*/
|
||||||
class LDAPUrlList{
|
class LDAPUrlList{
|
||||||
|
typedef std::list<LDAPUrl> ListType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef UrlList::const_iterator const_iterator;
|
typedef ListType::const_iterator const_iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an empty list.
|
* Constructs an empty list.
|
||||||
|
|
@ -72,6 +72,6 @@ class LDAPUrlList{
|
||||||
void add(const LDAPUrl& url);
|
void add(const LDAPUrl& url);
|
||||||
|
|
||||||
private :
|
private :
|
||||||
UrlList m_urls;
|
ListType m_urls;
|
||||||
};
|
};
|
||||||
#endif //LDAP_URL_LIST_H
|
#endif //LDAP_URL_LIST_H
|
||||||
|
|
|
||||||
|
|
@ -85,5 +85,5 @@ noinst_HEADERS = LDAPAddRequest.h \
|
||||||
LDAPSearchRequest.h
|
LDAPSearchRequest.h
|
||||||
|
|
||||||
libldapcpp_la_LIBADD = -lldap -llber
|
libldapcpp_la_LIBADD = -lldap -llber
|
||||||
libldapcpp_la_LDFLAGS = -version-info 0:1:0
|
libldapcpp_la_LDFLAGS = -version-info 0:2:0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@ StringList::StringList(){
|
||||||
}
|
}
|
||||||
|
|
||||||
StringList::StringList(const StringList& sl){
|
StringList::StringList(const StringList& sl){
|
||||||
m_data= ListType(sl.m_data);
|
m_data= StringList::ListType(sl.m_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringList::StringList(char** values){
|
StringList::StringList(char** values){
|
||||||
if(values == 0){
|
if(values == 0){
|
||||||
m_data=ListType();
|
m_data=StringList::ListType();
|
||||||
}else{
|
}else{
|
||||||
char** i;
|
char** i;
|
||||||
for(i=values; *i != 0; i++){
|
for(i=values; *i != 0; i++){
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
typedef std::list<std::string> ListType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container class to store multiple string-objects
|
* Container class to store multiple string-objects
|
||||||
*/
|
*/
|
||||||
class StringList{
|
class StringList{
|
||||||
|
typedef std::list<std::string> ListType;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ListType m_data;
|
ListType m_data;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue