From b1768ef92d592009a9c8462c76168fbd3c6d3ccb Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 19 Sep 2012 15:30:34 +0200 Subject: [PATCH] used class LogoSimpleFormatter (namespace BaseLib) instead of own class --- SimpleTests/MeshTests/CollapseMeshNodes.cpp | 16 ++-------------- SimpleTests/MeshTests/MeshSearchTest.cpp | 15 ++------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/SimpleTests/MeshTests/CollapseMeshNodes.cpp b/SimpleTests/MeshTests/CollapseMeshNodes.cpp index ee44736e208..8145e97dde8 100644 --- a/SimpleTests/MeshTests/CollapseMeshNodes.cpp +++ b/SimpleTests/MeshTests/CollapseMeshNodes.cpp @@ -13,6 +13,7 @@ #include "MemWatch.h" #include "RunTime.h" #include "tclap/CmdLine.h" +#include "LogogSimpleFormatter.h" // BaseLib/logog #include "logog.hpp" @@ -24,23 +25,10 @@ #include "Legacy/MeshIO.h" #include "MeshCoarsener.h" - -/** - * new formatter for logog - */ -class FormatterCustom : public logog::FormatterGCC -{ - virtual TOPIC_FLAGS GetTopicFlags( const logog::Topic &topic ) - { - return ( Formatter::GetTopicFlags( topic ) & - ~( TOPIC_FILE_NAME_FLAG | TOPIC_LINE_NUMBER_FLAG )); - } -}; - int main(int argc, char *argv[]) { LOGOG_INITIALIZE(); - FormatterCustom *custom_format (new FormatterCustom); + BaseLib::LogogSimpleFormatter *custom_format (new BaseLib::LogogSimpleFormatter); logog::Cout *logogCout(new logog::Cout); logogCout->SetFormatter(*custom_format); diff --git a/SimpleTests/MeshTests/MeshSearchTest.cpp b/SimpleTests/MeshTests/MeshSearchTest.cpp index e8b7f7066e1..c70c22f042c 100644 --- a/SimpleTests/MeshTests/MeshSearchTest.cpp +++ b/SimpleTests/MeshTests/MeshSearchTest.cpp @@ -13,6 +13,7 @@ #include "MemWatch.h" #include "RunTime.h" #include "tclap/CmdLine.h" +#include "LogogSimpleFormatter.h" // BaseLib/logog #include "logog.hpp" @@ -26,18 +27,6 @@ #include "Mesh.h" #include "Legacy/MeshIO.h" -/** - * new formatter for logog - */ -class FormatterCustom : public logog::FormatterGCC -{ - virtual TOPIC_FLAGS GetTopicFlags( const logog::Topic &topic ) - { - return ( Formatter::GetTopicFlags( topic ) & - ~( TOPIC_FILE_NAME_FLAG | TOPIC_LINE_NUMBER_FLAG )); - } -}; - void testMeshGridAlgorithm(MeshLib::Mesh const*const mesh, std::vector<GeoLib::Point*>& pnts_for_search, std::vector<size_t> &idx_found_nodes, bool contiguous) @@ -106,7 +95,7 @@ int main(int argc, char *argv[]) { LOGOG_INITIALIZE(); logog::Cout* logog_cout (new logog::Cout); - FormatterCustom *custom_format (new FormatterCustom); + BaseLib::LogogSimpleFormatter *custom_format (new BaseLib::LogogSimpleFormatter); logog_cout->SetFormatter(*custom_format); TCLAP::CmdLine cmd("Simple mesh search test", ' ', "0.1"); -- GitLab