From d305ed01ac10de2064c8dc223720b65ec586ac82 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Mon, 3 Jun 2024 10:05:35 -0500 Subject: [PATCH] refactor --- examples/common.hpp | 2 +- include/{ => dtl}/Diff.hpp | 9 ++++----- include/{ => dtl}/Diff3.hpp | 2 +- include/{ => dtl}/Lcs.hpp | 4 ++-- include/{ => dtl}/Sequence.hpp | 0 include/{ => dtl}/Ses.hpp | 4 ++-- include/{ => dtl}/dtl.hpp | 14 +++++++------- include/{ => dtl}/functors.hpp | 2 +- include/{ => dtl}/variables.hpp | 0 test/Objdifftest.cpp | 2 -- test/Strdiff3test.cpp | 2 -- test/Strdifftest.cpp | 2 -- test/comparators.hpp | 2 +- test/dtl_test_common.hpp | 4 +++- 14 files changed, 22 insertions(+), 27 deletions(-) rename include/{ => dtl}/Diff.hpp (99%) rename include/{ => dtl}/Diff3.hpp (99%) rename include/{ => dtl}/Lcs.hpp (97%) rename include/{ => dtl}/Sequence.hpp (100%) rename include/{ => dtl}/Ses.hpp (98%) rename include/{ => dtl}/dtl.hpp (91%) rename include/{ => dtl}/functors.hpp (99%) rename include/{ => dtl}/variables.hpp (100%) diff --git a/examples/common.hpp b/examples/common.hpp index b0875f3..6d699b0 100644 --- a/examples/common.hpp +++ b/examples/common.hpp @@ -1,7 +1,7 @@ #ifndef DTL_EXAMPLE_COMMON_H #define DTL_EXAMPLE_COMMON_H -#include "dtl.hpp" +#include "dtl/dtl.hpp" bool isFileExist(std::string &fs); bool isFewArgs(int argc, int limit = 3); diff --git a/include/Diff.hpp b/include/dtl/Diff.hpp similarity index 99% rename from include/Diff.hpp rename to include/dtl/Diff.hpp index 2bd516c..8f1ee4c 100644 --- a/include/Diff.hpp +++ b/include/dtl/Diff.hpp @@ -38,11 +38,10 @@ #ifndef DTL_DIFF_H #define DTL_DIFF_H -#include "variables.hpp" - -#include "Lcs.hpp" -#include "Ses.hpp" -#include "functors.hpp" +#include "dtl/Lcs.hpp" +#include "dtl/Ses.hpp" +#include "dtl/functors.hpp" +#include "dtl/variables.hpp" namespace dtl { diff --git a/include/Diff3.hpp b/include/dtl/Diff3.hpp similarity index 99% rename from include/Diff3.hpp rename to include/dtl/Diff3.hpp index 01b1a98..70dffc9 100644 --- a/include/Diff3.hpp +++ b/include/dtl/Diff3.hpp @@ -38,7 +38,7 @@ #ifndef DTL_DIFF3_H #define DTL_DIFF3_H -#include "Diff.hpp" +#include "dtl/Diff.hpp" namespace dtl { diff --git a/include/Lcs.hpp b/include/dtl/Lcs.hpp similarity index 97% rename from include/Lcs.hpp rename to include/dtl/Lcs.hpp index 7a601c7..1b85ca4 100644 --- a/include/Lcs.hpp +++ b/include/dtl/Lcs.hpp @@ -38,8 +38,8 @@ #ifndef DTL_LCS_H #define DTL_LCS_H -#include "variables.hpp" -#include "Sequence.hpp" +#include "dtl/variables.hpp" +#include "dtl/Sequence.hpp" namespace dtl { diff --git a/include/Sequence.hpp b/include/dtl/Sequence.hpp similarity index 100% rename from include/Sequence.hpp rename to include/dtl/Sequence.hpp diff --git a/include/Ses.hpp b/include/dtl/Ses.hpp similarity index 98% rename from include/Ses.hpp rename to include/dtl/Ses.hpp index 54df713..ce68095 100644 --- a/include/Ses.hpp +++ b/include/dtl/Ses.hpp @@ -38,8 +38,8 @@ #ifndef DTL_SES_H #define DTL_SES_H -#include "variables.hpp" -#include "Sequence.hpp" +#include "dtl/variables.hpp" +#include "dtl/Sequence.hpp" namespace dtl { diff --git a/include/dtl.hpp b/include/dtl/dtl.hpp similarity index 91% rename from include/dtl.hpp rename to include/dtl/dtl.hpp index b1b7c43..6d2bff1 100644 --- a/include/dtl.hpp +++ b/include/dtl/dtl.hpp @@ -54,12 +54,12 @@ #include #endif // HAVE_UNISTD_H -#include "Diff.hpp" -#include "Diff3.hpp" -#include "Lcs.hpp" -#include "Sequence.hpp" -#include "Ses.hpp" -#include "functors.hpp" -#include "variables.hpp" +#include "dtl/Diff.hpp" +#include "dtl/Diff3.hpp" +#include "dtl/Lcs.hpp" +#include "dtl/Sequence.hpp" +#include "dtl/Ses.hpp" +#include "dtl/functors.hpp" +#include "dtl/variables.hpp" #endif // DTL_H diff --git a/include/functors.hpp b/include/dtl/functors.hpp similarity index 99% rename from include/functors.hpp rename to include/dtl/functors.hpp index 84ef207..d25a343 100644 --- a/include/functors.hpp +++ b/include/dtl/functors.hpp @@ -38,7 +38,7 @@ #ifndef DTL_FUNCTORS_H #define DTL_FUNCTORS_H -#include "variables.hpp" +#include "dtl/variables.hpp" namespace dtl { diff --git a/include/variables.hpp b/include/dtl/variables.hpp similarity index 100% rename from include/variables.hpp rename to include/dtl/variables.hpp diff --git a/test/Objdifftest.cpp b/test/Objdifftest.cpp index ae734a6..37e0ab4 100644 --- a/test/Objdifftest.cpp +++ b/test/Objdifftest.cpp @@ -1,7 +1,5 @@ #include "dtl_test_common.hpp" -#include "comparators.hpp" - class Objdifftest : public ::testing::Test { protected: dtl_test_typedefs(string, vector) typedef struct case_t { diff --git a/test/Strdiff3test.cpp b/test/Strdiff3test.cpp index cb15f04..43aa446 100644 --- a/test/Strdiff3test.cpp +++ b/test/Strdiff3test.cpp @@ -1,7 +1,5 @@ #include "dtl_test_common.hpp" -#include "comparators.hpp" - class Strdiff3test : public ::testing::Test { protected: dtl_test_typedefs(char, string) typedef struct case_t { diff --git a/test/Strdifftest.cpp b/test/Strdifftest.cpp index 4f9d576..a114e04 100644 --- a/test/Strdifftest.cpp +++ b/test/Strdifftest.cpp @@ -1,7 +1,5 @@ #include "dtl_test_common.hpp" -#include "comparators.hpp" - class Strdifftest : public ::testing::Test { protected: dtl_test_typedefs(char, string) typedef struct case_t { diff --git a/test/comparators.hpp b/test/comparators.hpp index 36edd99..1ef59a8 100644 --- a/test/comparators.hpp +++ b/test/comparators.hpp @@ -1,7 +1,7 @@ #ifndef DTL_COMPARATORS #define DTL_COMPARATORS -#include "functors.hpp" +#include "dtl/functors.hpp" class CaseInsensitive : public dtl::Compare { public: diff --git a/test/dtl_test_common.hpp b/test/dtl_test_common.hpp index 2df90fc..d0a75d4 100644 --- a/test/dtl_test_common.hpp +++ b/test/dtl_test_common.hpp @@ -3,7 +3,9 @@ #include -#include "dtl.hpp" +#include "dtl/dtl.hpp" + +#include "comparators.hpp" using std::cerr; using std::endl;