From 00bf45805c782c002f9afe79ead8fdacfe72b986 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Thu, 6 Dec 2012 11:27:18 +0100 Subject: [PATCH] add TemplateLogogFormatterSuppressedGCC class in BaseLib --- BaseLib/TemplateLogogFormatterSuppressedGCC.h | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 BaseLib/TemplateLogogFormatterSuppressedGCC.h diff --git a/BaseLib/TemplateLogogFormatterSuppressedGCC.h b/BaseLib/TemplateLogogFormatterSuppressedGCC.h new file mode 100644 index 00000000000..6fa00e00405 --- /dev/null +++ b/BaseLib/TemplateLogogFormatterSuppressedGCC.h @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * + * \file TemplateLogogFormatterSuppressedGCC.h + * + * Created on 2012-12-06 by Norihiro Watanabe + */ + +#ifndef TEMPLATELOGOGFORMATTERSUPPRESSEDGCC_H_ +#define TEMPLATELOGOGFORMATTERSUPPRESSEDGCC_H_ + +// ** INCLUDES ** +#include "logog/include/logog.hpp" + +namespace BaseLib { + +/** + * \brief TemplateLogogFormatterSuppressedGCC strips topics given as a template + * parameter from logog::FormatterGCC. + * See http://johnwbyrd.github.com/logog/customformatting.html for details. + **/ +template <int T_SUPPPRESS_TOPIC_FLAG> +class TemplateLogogFormatterSuppressedGCC : public logog::FormatterGCC +{ + + virtual TOPIC_FLAGS GetTopicFlags( const logog::Topic &topic ) + { + return ( logog::Formatter::GetTopicFlags( topic ) & + ~( T_SUPPPRESS_TOPIC_FLAG )); + } + +}; + +#endif // TEMPLATELOGOGFORMATTERSUPPRESSEDGCC_H_ + +} // namespace BaseLib -- GitLab