Changeset 313 for XIOS/trunk/src/indent.hpp
- Timestamp:
- 02/18/12 22:43:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/indent.hpp
r219 r313 1 #ifndef __X MLIO_CIndent__2 #define __X MLIO_CIndent__1 #ifndef __XIOS_INDENT_HPP__ 2 #define __XIOS_INDENT_HPP__ 3 3 4 /// xmlioserver headers /// 5 #include "xmlioserver_spl.hpp" 6 #include "xml_node.hpp" 4 #include <ostream> 7 5 8 6 namespace xmlioserver 9 7 { 10 /// ////////////////////// Déclarations ////////////////////// /// 11 class CIndent 12 { 13 public : 8 class Cindent 9 { 10 public: 11 static int defaultIncSize; 12 static int index ; 13 int incSize ; 14 int offset ; 15 bool reset ; 16 public : 14 17 15 /// Méthodes statiques /// 16 static StdOStream & NIndent (StdOStream & out); 17 static StdOStream & IncIndent(StdOStream & out); 18 static StdOStream & DecEndl (StdOStream & out); 18 Cindent(int i=0, bool r=false) ; 19 Cindent operator++(int) ; 20 Cindent operator--(int) ; 21 Cindent operator++() ; 22 Cindent operator--() ; 23 Cindent operator+=(int n) ; 24 Cindent operator-=(int n) ; 25 std::ostream& iendl(std::ostream& o) const ; 26 }; 27 28 std::ostream& operator <<(std::ostream& o, const Cindent& indent) ; 19 29 20 private : 30 extern Cindent iendl; 31 extern Cindent ireset; 21 32 22 /// Propriétés statiques /// 23 static unsigned int Indent; 24 static StdString Increm; 25 static bool WithLine; 26 27 }; // class CIndent 28 29 ///-------------------------------------------------------------- 30 31 class CIndentedXml 32 { 33 public : 34 35 /// Méthode statique /// 36 static StdString Indented(const StdString & content); 37 38 }; // class CIndentedXml 39 40 ///-------------------------------------------------------------- 41 42 } // namespace xmlioserver 43 44 /// ////////////////////// Macros ////////////////////// /// 45 46 #define NIndent CIndent::NIndent 47 #define IncIndent CIndent::IncIndent 48 #define DecEndl CIndent::DecEndl 49 50 #endif // __XMLIO_CIndent__ 33 } 34 #endif
Note: See TracChangeset
for help on using the changeset viewer.