diff --git a/cmake/add_flags.cmake b/cmake/add_flags.cmake index 71fdef6..1eb859d 100644 --- a/cmake/add_flags.cmake +++ b/cmake/add_flags.cmake @@ -14,4 +14,4 @@ MACRO(add_ctest_flags) list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") endforeach() -ENDMACRO() \ No newline at end of file +ENDMACRO() diff --git a/cmake/add_include_directories.cmake b/cmake/add_include_directories.cmake index 2e205c5..e31a1e1 100644 --- a/cmake/add_include_directories.cmake +++ b/cmake/add_include_directories.cmake @@ -8,4 +8,4 @@ MACRO(SUBDIR_INCLUDE_DIRECTORIES curdir) ENDIF() ENDFOREACH() include_directories( ${dirlist} ) -ENDMACRO() \ No newline at end of file +ENDMACRO() diff --git a/cmake/create_library.cmake b/cmake/create_library.cmake index b6637bb..75d6ab7 100644 --- a/cmake/create_library.cmake +++ b/cmake/create_library.cmake @@ -5,19 +5,19 @@ MACRO(create_library libname) add_library(${libname} STATIC src/${libname}.cpp) target_include_directories( ${libname} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include PRIVATE ${BOOST_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ) message("for ${libname} added include dir: ${CMAKE_CURRENT_SOURCE_DIR}/include") - + set(${libname}_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "") set(variadic ${ARGN}) list(LENGTH variadic var_length) - + if(var_length GREATER 0) target_link_libraries( ${libname} ${variadic} ) foreach( pack ${variadic} ) message("for ${libname} adding pack: ${pack} with includes: ${${pack}_INCLUDE_DIRECTORIES}") - if(pack STREQUAL "Drogon::Drogon") - continue() + if(pack STREQUAL "Drogon::Drogon") + continue() endif() include_directories(${${pack}_INCLUDE_DIRECTORIES}) endforeach() @@ -41,8 +41,8 @@ MACRO(create_qt_library libname) foreach( pack ${variadic} ) message("for ${libname} adding pack: ${pack} with includes: ${${pack}_INCLUDE_DIRECTORIES}") - if(pack STREQUAL "Drogon::Drogon") - continue() + if(pack STREQUAL "Drogon::Drogon") + continue() endif() include_directories(${${pack}_INCLUDE_DIRECTORIES}) endforeach() diff --git a/cmake/get_all_directories.cmake b/cmake/get_all_directories.cmake index 83c924c..1058876 100644 --- a/cmake/get_all_directories.cmake +++ b/cmake/get_all_directories.cmake @@ -7,4 +7,4 @@ MACRO(SUBDIRLIST result curdir) ENDIF() ENDFOREACH() SET(${result} ${dirlist}) -ENDMACRO() \ No newline at end of file +ENDMACRO() diff --git a/cmake/get_all_files.cmake b/cmake/get_all_files.cmake index ff82c54..2fb0da1 100644 --- a/cmake/get_all_files.cmake +++ b/cmake/get_all_files.cmake @@ -5,4 +5,4 @@ ENDMACRO() MACRO(GET_ALL_DIRS sub return_list reg) file(GLOB_RECURSE ${return_list} LIST_DIRECTORIES true ${CMAKE_CURRENT_SOURCE_DIR}/${sub}/*) list(FILTER ${return_list} INCLUDE REGEX ${reg}) -ENDMACRO() \ No newline at end of file +ENDMACRO() diff --git a/include/serek/private/acceptors.hpp b/include/serek/private/acceptors.hpp index 1df3640..5aa7616 100644 --- a/include/serek/private/acceptors.hpp +++ b/include/serek/private/acceptors.hpp @@ -4,9 +4,9 @@ * @brief Contains declarations and definition of classes that handles visitors * @version 0.1 * @date 2021-08-29 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -23,7 +23,7 @@ namespace serek /** * @brief Predeclaration of acceptor_impl - * + * * @tparam acceptor_worker_t statically checks is given worker is valid */ template @@ -31,7 +31,7 @@ namespace serek /** * @brief Most common visitor handler, which just evaluates worker - * + * * @tparam acceptor_worker_t worker to call * @tparam child_t type forwarded to worker; type from derivation tree of this class */ @@ -40,11 +40,11 @@ namespace serek { /** * @brief performs actuall job (invokes worker) - * + * * @tparam visitor_t type of visitor to invoker * @param visitor visitor to invoke * @return visitor_result_t - * + * * @see visitor_req */ template @@ -72,17 +72,17 @@ namespace serek { /** * @brief helper function, that invokes visitor - * + * * @param visitor visitor to invoke * @param acceptor object to pass to visitor - * @return visitor_result_t + * @return visitor_result_t */ inline visitor_result_t call_visitator(auto* visitor, auto* acceptor) { return (*visitor)(acceptor); } } // namespace /** * @brief base for further acceptor workers - * + * * @tparam child_t type that is currently handled */ template @@ -92,8 +92,8 @@ namespace serek protected: /** - * @brief helper method that validates - * + * @brief helper method that validates + * * @tparam visitor_t type of visitor * @param visitor visitor to check */ @@ -107,7 +107,7 @@ namespace serek /** * @brief most common worker, that just invokes visitor - * + * * @tparam child_t currently processed type */ template @@ -115,7 +115,7 @@ namespace serek { /** * @brief Construct a new basic acceptor worker object and actally performs action - * + * * @tparam visitor_t type of visitor * @param acceptor object to handle via visitor * @param visitor visitor to call @@ -140,7 +140,7 @@ namespace serek /** * @brief alias for acceptor that is in first member in struct - * + * * @tparam child_t given type of first member */ template @@ -148,7 +148,7 @@ namespace serek /** * @brief predeclaration is used here to extract type further in specialisation - * + * * @tparam value static pointer to field */ template @@ -156,7 +156,7 @@ namespace serek /** * @brief type wrapper for `forward_acceptor_worker_impl` - * + * * @tparam class_t type of top level owner of field * @tparam prev_field_t type of previous memeber * @tparam value static pointer to previous member @@ -166,7 +166,7 @@ namespace serek { /** * @brief actual implementation of acceptor worker, which forward visitor to previous member - * + * * @tparam child_t type of current field */ template @@ -174,7 +174,7 @@ namespace serek { /** * @brief Construct a new forward acceptor worker impl object and evaluates visitor - * + * * @tparam visitor_t type of visitor * @param acceptor object to pass to visitor * @param visitor visito to call @@ -201,4 +201,4 @@ namespace serek }; } // namespace workers } // namespace acceptors -} // namespace serek \ No newline at end of file +} // namespace serek diff --git a/include/serek/private/exceptions.hpp b/include/serek/private/exceptions.hpp index 5b94f3a..e38e13d 100644 --- a/include/serek/private/exceptions.hpp +++ b/include/serek/private/exceptions.hpp @@ -4,9 +4,9 @@ * @brief Contains declarations of exception mechanism * @version 0.1 * @date 2021-08-29 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -34,22 +34,22 @@ namespace serek { /** * @brief Construct a new exception base object - * + * * @param msg message to print on what() */ explicit exception_base(str_v msg = "unknown"); /** * @brief accessor to `message` - * - * @return const char* + * + * @return const char* */ virtual const char* what() const noexcept; /** * @brief returns `exception_base::what()` with stacktrace - * - * @return str + * + * @return str */ virtual str pretty() const noexcept; @@ -81,7 +81,7 @@ namespace serek { /** * @brief Construct a new comprasion fail exception object - * + * * @param i_what forwarded to parent (what()) * @param i_comprasion_result string to set as comprasion result */ @@ -89,8 +89,8 @@ namespace serek /** * @brief overrides default pretty, by preinserting `i_comprasion_result` - * - * @return str + * + * @return str */ virtual str pretty() const noexcept override; @@ -102,12 +102,12 @@ namespace serek { /** * @brief generates message of failed comprasion - * + * * @tparam operator_t functor type * @tparam T type of element that was compared * @param l_value left operand * @param r_value right operand - * @return str + * @return str */ template str format_fail_comprasion(const T& l_value, const T& r_value) @@ -121,7 +121,7 @@ namespace serek /** * @brief alternative to assert - * + * * @tparam exceptions::assert_exception exception type to throw * @param result result from some action * @param error_message message to forwrd to exception @@ -134,7 +134,7 @@ namespace serek /** * @brief overload of above, allows additionally print given values - * + * * @tparam operator_t functor that will be used for comprasion ( @see std::less ) * @tparam T type of compared elements * @param l_value left operand @@ -150,7 +150,7 @@ namespace serek /** * @brief overload of above, specialized for checking pointers - * + * * @tparam pointer_t type of pointer to validate * @param ptr pointer to check * @param error_message message to forwrd to exception @@ -164,9 +164,9 @@ namespace serek /** * @brief operator to easly print exceptions - * + * * @param os stream * @param ex exception - * @return std::ostream& + * @return std::ostream& */ -std::ostream& operator<<(std::ostream& os, const serek::exceptions::exception_base& ex); \ No newline at end of file +std::ostream& operator<<(std::ostream& os, const serek::exceptions::exception_base& ex); diff --git a/include/serek/private/field.hpp b/include/serek/private/field.hpp index 69a9d78..a090281 100644 --- a/include/serek/private/field.hpp +++ b/include/serek/private/field.hpp @@ -4,9 +4,9 @@ * @brief Contains implementation of field template representation * @version 0.1 * @date 2021-08-03 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -54,4 +54,4 @@ namespace serek template using ffield = detail::field_impl_value_handler; -} // namespace serek \ No newline at end of file +} // namespace serek diff --git a/include/serek/private/pack.hpp b/include/serek/private/pack.hpp index b9d8e1e..3ebeaac 100644 --- a/include/serek/private/pack.hpp +++ b/include/serek/private/pack.hpp @@ -4,9 +4,9 @@ * @brief Contains implementation of wrapper for class * @version 0.1 * @date 2021-09-07 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -24,7 +24,7 @@ namespace serek { /** * @brief can be used to wrap class to be iterable over fields - * + * * @tparam last_field last field */ template @@ -32,7 +32,7 @@ namespace serek /** * @copydoc pack_impl - * + * * @tparam owner_t type of class that is wrapped * @tparam previous_field_t type of last field * @tparam owner_t::*value static pointer to last field @@ -50,10 +50,10 @@ namespace serek /** * @brief forwards visitor to last field - * + * * @tparam visitor_t type of visitor to forward * @param v visitor to forward - * @return visitor_result_t + * @return visitor_result_t */ template visitor_result_t visit(visitor_t* v) @@ -85,4 +85,4 @@ namespace serek */ template using pack = typename detail::pack_impl; -} // namespace serek \ No newline at end of file +} // namespace serek diff --git a/include/serek/private/requirements.hpp b/include/serek/private/requirements.hpp index a7a25db..b100adc 100644 --- a/include/serek/private/requirements.hpp +++ b/include/serek/private/requirements.hpp @@ -4,9 +4,9 @@ * @brief Contatins declarations and definitions of concepts * @version 0.1 * @date 2021-08-30 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -47,7 +47,7 @@ namespace serek /** * @brief checks is given type is fundamental wrapper - * + * * @tparam T type to check */ template @@ -59,13 +59,13 @@ namespace serek /** * @brief checks is given type fullfils visitor requirements - * + * * @tparam visitor_t type to check */ template concept visitor_req = requires(visitor_t* x) { - std::same_astemplate operator()(new serek::detail::fundamental_type_holder)), visitor_result_t>; + std::same_astemplate operator()(new serek::detail::type_holder)), visitor_result_t>; std::same_aslast_result), visitor_result_t>; std::same_asthat()), void*>; {x->that(static_cast(NULL))}; @@ -101,8 +101,8 @@ namespace serek /** * @brief checks is given type can be used as accptor - * - * @tparam acceptor_t + * + * @tparam acceptor_t */ template concept acceptor_req = requires(acceptor_t* x) @@ -117,7 +117,7 @@ namespace serek { /** * @brief own imlementation of std::is_invocable - * + * * @tparam T type to check is invocable * @tparam Argv invocable argument types */ @@ -130,7 +130,7 @@ namespace serek /** * @brief checks is given type can be used as acceptor worker - * + * * @tparam T type to check */ template @@ -142,7 +142,7 @@ namespace serek /** * @brief checks is given type can be compared like pointerr - * + * * @tparam T type to check */ template @@ -154,7 +154,7 @@ namespace serek /** * @brief checks is given type can be used as exception * @note it just need to be constructible from std::string_view - * + * * @tparam T type to check */ template @@ -167,4 +167,4 @@ namespace serek } // namespace requirements namespace reqs = requirements::detail; -} // namespace serek \ No newline at end of file +} // namespace serek diff --git a/include/serek/private/type_holders.hpp b/include/serek/private/type_holders.hpp index 8928b38..8ada24e 100644 --- a/include/serek/private/type_holders.hpp +++ b/include/serek/private/type_holders.hpp @@ -4,9 +4,9 @@ * @brief Contatins declarations and definitions of structures responsible for accessing contained value * @version 0.1 * @date 2021-08-30 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once diff --git a/include/serek/private/types.hpp b/include/serek/private/types.hpp index ee26fc0..0ca8baf 100644 --- a/include/serek/private/types.hpp +++ b/include/serek/private/types.hpp @@ -4,9 +4,9 @@ * @brief Contains aliases for commonly used types * @version 0.1 * @date 2021-08-30 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -19,4 +19,4 @@ namespace serek using visitor_result_t = bool; using str = std::string; using str_v = std::string_view; -} // namespace serek \ No newline at end of file +} // namespace serek diff --git a/include/serek/private/visitors.hpp b/include/serek/private/visitors.hpp index bd5fcea..351427a 100644 --- a/include/serek/private/visitors.hpp +++ b/include/serek/private/visitors.hpp @@ -4,9 +4,9 @@ * @brief Contains declarations of visitors * @version 0.1 * @date 2021-08-30 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -20,7 +20,7 @@ namespace serek { /** * @brief Contatins declaration of visitor base class (interface) - * + * */ namespace visitors { @@ -28,7 +28,7 @@ namespace serek /** * @brief base class for further visitors - * + * * @note derive from this class to fullfill most of `reqs::visitor_req` concept */ struct base_visitor_members @@ -37,7 +37,7 @@ namespace serek /** * @brief Construct a new base visitor members object - * + * * @tparam Any type of opinter * @param i_that pointer to object that will be visited * @todo rethink is `i_that` required in base class, maybe it should be in something like `base_field_iterable_visitor_t`? @@ -50,14 +50,14 @@ namespace serek /** * @brief returns pointer to that - * - * @return void* + * + * @return void* */ void* that() const { return const_cast(m_that); } /** * @brief sets that pointer - * + * * @param input pointer to set as that */ void that(volatile void* input) { m_that = input; } @@ -69,9 +69,9 @@ namespace serek /** * @copydoc base_visitor_members::that() const - * + * * @tparam Any type to cast `that` to - * @return Any* + * @return Any* */ template Any* that() const @@ -81,7 +81,7 @@ namespace serek /** * @copydoc base_visitor_members::that(volatile void* input) - * + * * @tparam Any type of input pointer */ template @@ -123,12 +123,12 @@ namespace serek /** * @brief This function should be called to visit objects - * + * * @tparam visitor_t type of visitor * @tparam acceptor_t type of object to be visitred * @param vis visitor that will be passed to `object` * @param object acceptor that will get `vis` via `::visit()` method - * @return visitor_result_t + * @return visitor_result_t */ template visitor_result_t visit(visitor_t* vis, acceptor_t* object) @@ -146,4 +146,4 @@ namespace serek return object->visit(vis); } } // namespace visitors -} // namespace serek \ No newline at end of file +} // namespace serek diff --git a/include/serek/serek.hpp b/include/serek/serek.hpp index 0963e3c..1ccbdba 100644 --- a/include/serek/serek.hpp +++ b/include/serek/serek.hpp @@ -4,9 +4,9 @@ * @brief Proxy file and accessor for library * @version 0.1 * @date 2021-08-29 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once diff --git a/src/serek.cpp b/src/serek.cpp index f47129e..b811b36 100644 --- a/src/serek.cpp +++ b/src/serek.cpp @@ -4,9 +4,9 @@ * @brief Contains implementations of few methods and functions * @version 0.1 * @date 2021-08-30 - * + * * @copyright Copyright (c) 2021 - * + * */ #include @@ -25,9 +25,9 @@ namespace /** * @brief generates stacktrace. requires backtrace to work - * + * * @param out result will be saved, into given shared pointer - * + * * @warning std::make_shared will be executed on given reference * @note stacktrace format: #0000 at ${function_name} in file ${source_file}:${source_line_no}\n */ @@ -80,4 +80,4 @@ namespace serek } // namespace serek -std::ostream& operator<<(std::ostream& os, const serek::exceptions::exception_base& ex) { return os << ex.pretty(); } \ No newline at end of file +std::ostream& operator<<(std::ostream& os, const serek::exceptions::exception_base& ex) { return os << ex.pretty(); } diff --git a/tests/field.test.cpp b/tests/field.test.cpp index 9c6a7ed..f4b40bd 100644 --- a/tests/field.test.cpp +++ b/tests/field.test.cpp @@ -214,4 +214,4 @@ namespace } }; }; -} // namespace \ No newline at end of file +} // namespace diff --git a/tests/pack.test.cpp b/tests/pack.test.cpp index 42fa612..812cbeb 100644 --- a/tests/pack.test.cpp +++ b/tests/pack.test.cpp @@ -79,4 +79,4 @@ namespace but::expect(but::eq(ptr_nv->do_something(), 0)); }; }; -} // namespace \ No newline at end of file +} // namespace diff --git a/tests/require.test.cpp b/tests/require.test.cpp index 6ebeb5e..474e3b3 100644 --- a/tests/require.test.cpp +++ b/tests/require.test.cpp @@ -134,4 +134,4 @@ namespace compare_throw("aaa"s, "aaa"s); }; }; -} // namespace \ No newline at end of file +} // namespace diff --git a/tests/shared/include/shared/struct_set.hpp b/tests/shared/include/shared/struct_set.hpp index 5e86cdb..df66477 100644 --- a/tests/shared/include/shared/struct_set.hpp +++ b/tests/shared/include/shared/struct_set.hpp @@ -95,4 +95,4 @@ namespace example_structs int do_something() const { return 1; } }; } // namespace polimorphic -} // namespace example_structs \ No newline at end of file +} // namespace example_structs diff --git a/tests/shared/include/shared/tools.hpp b/tests/shared/include/shared/tools.hpp index 35d9d15..e51e495 100644 --- a/tests/shared/include/shared/tools.hpp +++ b/tests/shared/include/shared/tools.hpp @@ -4,9 +4,9 @@ * @brief Header file for usefull tools for testing * @version 0.1 * @date 2021-08-30 - * + * * @copyright Copyright (c) 2021 - * + * */ #pragma once @@ -18,13 +18,13 @@ namespace serek { /** * @brief Contatins shared structures used in many diffrent tests - * + * */ namespace tests { /** * @brief stores numbers - * + * * @tparam _N stored number */ template @@ -36,7 +36,7 @@ namespace serek /** * @brief verifies that both typesd has same size - * + * * @tparam T1 first type to get sizeof * @tparam T2 second type to get sizeof */ @@ -54,4 +54,4 @@ using namespace but::literals; /** * @brief a bit workaround, to add main to all tests :) */ -int main(); \ No newline at end of file +int main(); diff --git a/tests/shared/tools.cpp b/tests/shared/tools.cpp index 6ee8bcb..7d0bc77 100644 --- a/tests/shared/tools.cpp +++ b/tests/shared/tools.cpp @@ -7,4 +7,4 @@ namespace serek } } // namespace serek -int main() {} \ No newline at end of file +int main() {}