efea6b265c8429b62a24691ff2446d00b5b79aad
[platform/upstream/libxml++.git] / libxml++ / keepblanks.h
1 /* keepblanks.h
2  * libxml++ and this file are
3  * copyright (C) 2003 by The libxml++ Development Team, and
4  * are covered by the GNU Lesser General Public License, which should be
5  * included with libxml++ as the file COPYING.
6  */
7
8 #ifndef __LIBXMLPP_KEEPBLANKS_H
9 #define __LIBXMLPP_KEEPBLANKS_H
10
11 #include <libxml++config.h>
12
13 namespace xmlpp
14 {
15
16   /**
17    * This class set KeepBlanksDefault and IndentTreeOutput of libxmlpp
18    * and restore their initial value in its destructor. As a consequence
19    * the wanted setting is kept during instance lifetime.
20    */
21   class LIBXMLPP_API KeepBlanks {
22     public:
23       static const bool Default = true;
24
25     public:
26       KeepBlanks(bool value);
27       ~KeepBlanks();
28
29     private:
30       int oldKeepBlanksDefault_;
31       int oldIndentTreeOutput_;
32   };
33
34 }
35
36 #endif // __LIBXMLPP_KEEPBLANKS_H