Back to index

openldap  2.4.31
LdifWriter.h
Go to the documentation of this file.
00001 // $OpenLDAP$
00002 /*
00003  * Copyright 2008-2012 The OpenLDAP Foundation, All Rights Reserved.
00004  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
00005  */
00006 
00007 #ifndef LDIF_WRITER_H
00008 #define LDIF_WRITER_H
00009 
00010 #include <LDAPEntry.h>
00011 #include <iosfwd>
00012 #include <list>
00013 
00014 class LdifWriter
00015 {
00016     public:
00017         LdifWriter( std::ostream& output, int version = 0 );
00018         void writeRecord(const LDAPEntry& le);
00019         void writeIncludeRecord(const std::string& target);
00020 
00021     private:
00022         void breakline( const std::string &line, std::ostream &out );
00023 
00024         std::ostream& m_ldifstream;
00025         int m_version;
00026         bool m_addSeparator;
00027 
00028 };
00029 
00030 #endif /* LDIF_WRITER_H */
00031