X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FFormat.hh;h=180c39e86b4d80438fd38e182ee9db33d5dc2cee;hb=d80f142699130075658d6448c90adf71338f2c5a;hp=7e0b36487e30fe78796303d27871ce59d58c7af4;hpb=c9d8ba8de7801af854581eb9e175d7b4f19ece3d;p=senf.git diff --git a/senf/Utils/Format.hh b/senf/Utils/Format.hh index 7e0b364..180c39e 100644 --- a/senf/Utils/Format.hh +++ b/senf/Utils/Format.hh @@ -193,8 +193,30 @@ namespace format { template std::string dumpint(T const & v, typename boost::enable_if >::type * = 0); + + template + std::string dumpint(T const & v, + typename boost::enable_if >::type * = 0); + + template + std::string dumpint(T const & v, + typename boost::enable_if >::type * = 0); #endif + + class IndentHelper + { + static unsigned int static_level; + + unsigned int instance_level; + public: + IndentHelper () : instance_level(1) { ++static_level; } + ~IndentHelper () { static_level -= instance_level; } + void increase() { ++static_level; ++instance_level; } + + friend std::ostream & operator<<(std::ostream & os, IndentHelper const & indent); + }; + std::ostream & operator<<(std::ostream & os, IndentHelper const & indent); }}