ldapsdk
0.0.1
src
LdifReader.h
Go to the documentation of this file.
1
// $OpenLDAP$
2
/*
3
* Copyright 2008-2013 The OpenLDAP Foundation, All Rights Reserved.
4
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5
*/
6
7
#ifndef LDIF_READER_H
8
#define LDIF_READER_H
9
10
#include <
LDAPEntry.h
>
11
#include <iosfwd>
12
#include <list>
13
14
typedef
std::list< std::pair<std::string, std::string> >
LdifRecord
;
15
class
LdifReader
16
{
17
public
:
18
LdifReader
( std::istream &input );
19
20
inline
bool
isEntryRecords
()
const
21
{
22
return
!m_ldifTypeRequest;
23
}
24
25
inline
bool
isChangeRecords
()
const
26
{
27
return
m_ldifTypeRequest;
28
}
29
30
inline
int
getVersion
()
const
31
{
32
return
m_version;
33
}
34
35
LDAPEntry
getEntryRecord
();
36
int
readNextRecord
(
bool
first=
false
);
37
//LDAPRequest getChangeRecord();
38
39
private
:
40
int
getLdifLine(std::string &line);
41
42
void
splitLine(
const
std::string& line,
43
std::string &type,
44
std::string &value )
const
;
45
46
std::string readIncludeLine(
const
std::string &line)
const
;
47
48
std::istream &m_ldifstream;
49
LdifRecord
m_currentRecord;
50
int
m_version;
51
int
m_curRecType;
52
int
m_lineNumber;
53
bool
m_ldifTypeRequest;
54
bool
m_currentIsFirst;
55
};
56
57
#endif
/* LDIF_READER_H */
LdifReader::getEntryRecord
LDAPEntry getEntryRecord()
Definition:
LdifReader.cpp:180
LdifReader::isEntryRecords
bool isEntryRecords() const
Definition:
LdifReader.h:20
LdifReader::isChangeRecords
bool isChangeRecords() const
Definition:
LdifReader.h:25
LdifReader::readNextRecord
int readNextRecord(bool first=false)
Definition:
LdifReader.cpp:33
LdifRecord
std::list< std::pair< std::string, std::string > > LdifRecord
Definition:
LdifReader.h:14
LdifReader::LdifReader
LdifReader(std::istream &input)
Definition:
LdifReader.cpp:23
LdifReader::getVersion
int getVersion() const
Definition:
LdifReader.h:30
LDAPEntry.h
LDAPEntry
This class is used to store every kind of LDAP Entry.
Definition:
LDAPEntry.h:19
LdifReader
Definition:
LdifReader.h:15
Generated by
1.8.14