From fb389b0cc7593e5fb69bc76f02bdbe75752f5f52 Mon Sep 17 00:00:00 2001 From: Valentin Noel Date: Tue, 22 Oct 2013 10:59:24 +0200 Subject: [PATCH] add ElementChecker library issue #33 --- SConscript | 1 + libraries/ElementChecker/SConscript | 14 ++++++++++ .../src/ElementChecker/Checker/Checker.cpp | 18 +++++++++++++ .../src/ElementChecker/Checker/Checker.hpp | 27 +++++++++++++++++++ .../ElementChecker}/Translator/Translator.hpp | 0 .../ElementChecker}/Translator/Translator.tcc | 0 .../Translator/TranslatorFillStream.tcc | 0 .../Translator/TranslatorGetDisplayType.tcc | 0 8 files changed, 60 insertions(+) create mode 100644 libraries/ElementChecker/SConscript create mode 100644 libraries/ElementChecker/src/ElementChecker/Checker/Checker.cpp create mode 100644 libraries/ElementChecker/src/ElementChecker/Checker/Checker.hpp rename libraries/{BasicElement/src/BasicElement => ElementChecker/src/ElementChecker}/Translator/Translator.hpp (100%) rename libraries/{BasicElement/src/BasicElement => ElementChecker/src/ElementChecker}/Translator/Translator.tcc (100%) rename libraries/{BasicElement/src/BasicElement => ElementChecker/src/ElementChecker}/Translator/TranslatorFillStream.tcc (100%) rename libraries/{BasicElement/src/BasicElement => ElementChecker/src/ElementChecker}/Translator/TranslatorGetDisplayType.tcc (100%) diff --git a/SConscript b/SConscript index c2aa433..a708d45 100644 --- a/SConscript +++ b/SConscript @@ -39,6 +39,7 @@ SConscript( 'libraries/Common', 'libraries/SpecReader', 'libraries/BasicElement', + 'libraries/ElementChecker', 'libraries/FileReader', 'libraries/ReportGenerator', 'libraries/Comparator', diff --git a/libraries/ElementChecker/SConscript b/libraries/ElementChecker/SConscript new file mode 100644 index 0000000..8e2e692 --- /dev/null +++ b/libraries/ElementChecker/SConscript @@ -0,0 +1,14 @@ +Import( 'project', 'libs' ) + +project.StaticLibrary( + 'elementChecker', + dirs = ['src'], + includes = ['src'], + libraries = [ + libs.common, + libs.basicElement, + ], + shared = True + ) + + diff --git a/libraries/ElementChecker/src/ElementChecker/Checker/Checker.cpp b/libraries/ElementChecker/src/ElementChecker/Checker/Checker.cpp new file mode 100644 index 0000000..8635cb6 --- /dev/null +++ b/libraries/ElementChecker/src/ElementChecker/Checker/Checker.cpp @@ -0,0 +1,18 @@ + +#include "Checker.hpp" + +namespace element_checker +{ + +Checker::Checker( const std::shared_ptr< basic_element::Element > element ) + : _element( element ) +{ +} + +void Checker::check() +{ + std::cout << _element->getType() << std::cout; +} + +} + diff --git a/libraries/ElementChecker/src/ElementChecker/Checker/Checker.hpp b/libraries/ElementChecker/src/ElementChecker/Checker/Checker.hpp new file mode 100644 index 0000000..45cab33 --- /dev/null +++ b/libraries/ElementChecker/src/ElementChecker/Checker/Checker.hpp @@ -0,0 +1,27 @@ +#ifndef _ELEMENT_CHECKER_CHECKER_HPP_ +#define _ELEMENT_CHECKER_CHECKER_HPP_ + +#include +#include + +#include +#include + +namespace element_checker +{ + +class Checker +{ + +public: + Checker( const std::shared_ptr< basic_element::Element > element ); + + void check(); + +private: + std::shared_ptr< basic_element::Element > _element; +}; + +} + +#endif diff --git a/libraries/BasicElement/src/BasicElement/Translator/Translator.hpp b/libraries/ElementChecker/src/ElementChecker/Translator/Translator.hpp similarity index 100% rename from libraries/BasicElement/src/BasicElement/Translator/Translator.hpp rename to libraries/ElementChecker/src/ElementChecker/Translator/Translator.hpp diff --git a/libraries/BasicElement/src/BasicElement/Translator/Translator.tcc b/libraries/ElementChecker/src/ElementChecker/Translator/Translator.tcc similarity index 100% rename from libraries/BasicElement/src/BasicElement/Translator/Translator.tcc rename to libraries/ElementChecker/src/ElementChecker/Translator/Translator.tcc diff --git a/libraries/BasicElement/src/BasicElement/Translator/TranslatorFillStream.tcc b/libraries/ElementChecker/src/ElementChecker/Translator/TranslatorFillStream.tcc similarity index 100% rename from libraries/BasicElement/src/BasicElement/Translator/TranslatorFillStream.tcc rename to libraries/ElementChecker/src/ElementChecker/Translator/TranslatorFillStream.tcc diff --git a/libraries/BasicElement/src/BasicElement/Translator/TranslatorGetDisplayType.tcc b/libraries/ElementChecker/src/ElementChecker/Translator/TranslatorGetDisplayType.tcc similarity index 100% rename from libraries/BasicElement/src/BasicElement/Translator/TranslatorGetDisplayType.tcc rename to libraries/ElementChecker/src/ElementChecker/Translator/TranslatorGetDisplayType.tcc