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