]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/LdifWriter.h
b1bf3615dceab39875cb8388bc2d620fed02b08f
[openldap] / contrib / ldapc++ / src / LdifWriter.h
1 /*
2  * Copyright 2008, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6 #ifndef LDIF_WRITER_H
7 #define LDIF_WRITER_H
8
9 #include <LDAPEntry.h>
10 #include <iosfwd>
11 #include <list>
12
13 class LdifWriter
14 {
15     public:
16         LdifWriter( std::ostream& output, int version = 0 );
17         void writeRecord(const LDAPEntry& le);
18         void writeIncludeRecord(const std::string& target);
19
20     private:
21         void breakline( const std::string &line, std::ostream &out );
22
23         std::ostream& m_ldifstream;
24         int m_version;
25         bool m_addSeparator;
26
27 };
28
29 #endif /* LDIF_WRITER_H */
30