Browse Source

Moved public headers to a jessilib subfolder; adjusted code as necessary

master
Jessica James 3 years ago
parent
commit
c847d008fb
  1. 4
      src/bot/base_commands.cpp
  2. 4
      src/bot/console/console.cpp
  3. 2
      src/bot/console/console_command_context.cpp
  4. 2
      src/bot/console/console_command_context.hpp
  5. 4
      src/bot/main.cpp
  6. 1
      src/common/CMakeLists.txt
  7. 4
      src/common/parsers/json.cpp
  8. 4
      src/include/impl/timer_manager.hpp
  9. 0
      src/include/jessilib/app_parameters.hpp
  10. 0
      src/include/jessilib/asio.hpp
  11. 0
      src/include/jessilib/assert.hpp
  12. 0
      src/include/jessilib/config.hpp
  13. 0
      src/include/jessilib/duration.hpp
  14. 2
      src/include/jessilib/io/ansi/ansi_text.hpp
  15. 2
      src/include/jessilib/io/color.hpp
  16. 0
      src/include/jessilib/io/command.hpp
  17. 2
      src/include/jessilib/io/command_context.hpp
  18. 0
      src/include/jessilib/io/command_manager.hpp
  19. 0
      src/include/jessilib/io/irc/irc_text.hpp
  20. 0
      src/include/jessilib/io/message.hpp
  21. 0
      src/include/jessilib/object.hpp
  22. 0
      src/include/jessilib/parser.hpp
  23. 2
      src/include/jessilib/parsers/json.hpp
  24. 0
      src/include/jessilib/serialize.hpp
  25. 0
      src/include/jessilib/split.hpp
  26. 0
      src/include/jessilib/thread_pool.hpp
  27. 0
      src/include/jessilib/timer.hpp
  28. 0
      src/include/jessilib/type_traits.hpp
  29. 0
      src/include/jessilib/unicode.hpp
  30. 0
      src/include/jessilib/util.hpp
  31. 2
      src/test/app_parameters.cpp
  32. 4
      src/test/config.cpp
  33. 2
      src/test/duration.cpp
  34. 2
      src/test/io/color.cpp
  35. 3
      src/test/object.cpp
  36. 5
      src/test/parser.cpp
  37. 2
      src/test/parsers/json.cpp
  38. 2
      src/test/split.cpp
  39. 2
      src/test/split_compilation.cpp
  40. 2
      src/test/test_split.hpp
  41. 2
      src/test/thread_pool.cpp
  42. 2
      src/test/timer.cpp
  43. 2
      src/test/unicode.cpp
  44. 3
      src/test/util.cpp

4
src/bot/base_commands.cpp

@ -16,8 +16,8 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include "io/command.hpp" #include "jessilib/io/command.hpp"
#include "io/command_manager.hpp" #include "jessilib/io/command_manager.hpp"
#include "shutdown.hpp" #include "shutdown.hpp"
namespace jessibot { namespace jessibot {

4
src/bot/console/console.cpp

@ -19,8 +19,8 @@
#include "console.hpp" #include "console.hpp"
#include <iostream> #include <iostream>
#include "io/command_manager.hpp" #include "jessilib/io/command_manager.hpp"
#include "io/ansi/ansi_text.hpp" #include "jessilib/io/ansi/ansi_text.hpp"
#include "shutdown.hpp" #include "shutdown.hpp"
#include "console/console_command_context.hpp" #include "console/console_command_context.hpp"

2
src/bot/console/console_command_context.cpp

@ -19,7 +19,7 @@
#include "console_command_context.hpp" #include "console_command_context.hpp"
#include <iostream> #include <iostream>
#include "io/ansi/ansi_text.hpp" #include "jessilib/io/ansi/ansi_text.hpp"
namespace jessibot { namespace jessibot {
namespace io { namespace io {

2
src/bot/console/console_command_context.hpp

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "io/command_context.hpp" #include "jessilib/io/command_context.hpp"
namespace jessibot { namespace jessibot {
namespace io { namespace io {

4
src/bot/main.cpp

@ -17,8 +17,8 @@
*/ */
#include <iostream> #include <iostream>
#include "app_parameters.hpp" #include "jessilib/app_parameters.hpp"
#include "parsers/json.hpp" #include "jessilib/parsers/json.hpp"
#include "console/console.hpp" #include "console/console.hpp"
int main(int argc, char** argv) { int main(int argc, char** argv) {

1
src/common/CMakeLists.txt

@ -7,6 +7,7 @@ add_library(jessilib ${SOURCE_FILES})
# Setup include directories # Setup include directories
target_include_directories(jessilib PUBLIC ../include) target_include_directories(jessilib PUBLIC ../include)
target_include_directories(jessilib PRIVATE ../include/jessilib)
target_include_directories(jessilib PRIVATE ../include/impl/asio/include) target_include_directories(jessilib PRIVATE ../include/impl/asio/include)
# Setup additionally needed libs # Setup additionally needed libs

4
src/common/parsers/json.cpp

@ -221,7 +221,7 @@ std::string read_json_string(std::string_view& in_data) {
if (is_low_surrogate(second_codepoint)) { if (is_low_surrogate(second_codepoint)) {
// We've got a valid surrogate pair; serialize the represented codepoint; decode it // We've got a valid surrogate pair; serialize the represented codepoint; decode it
codepoint = decode_surrogate_pair(codepoint, second_codepoint).codepoint; codepoint = static_cast<char16_t>(decode_surrogate_pair(codepoint, second_codepoint).codepoint);
encode_codepoint(result, codepoint); // serialize the real codepoint encode_codepoint(result, codepoint); // serialize the real codepoint
} }
else { else {
@ -296,7 +296,7 @@ object read_json_number(std::string_view& in_data) {
// parse_decimal_part method // parse_decimal_part method
in_data.remove_prefix(1); // strip leading '.' in_data.remove_prefix(1); // strip leading '.'
long double decimal_value = integer_value; long double decimal_value = static_cast<long double>(integer_value);
from_chars_end = parse_decimal_part(in_data.data(), in_data.data() + in_data.size(), decimal_value); from_chars_end = parse_decimal_part(in_data.data(), in_data.data() + in_data.size(), decimal_value);
// TODO: parse exponent // TODO: parse exponent

4
src/include/impl/timer_manager.hpp

@ -24,8 +24,8 @@
#include <condition_variable> #include <condition_variable>
#include <atomic> #include <atomic>
#include <thread> #include <thread>
#include "../timer.hpp" #include "timer.hpp"
#include "../thread_pool.hpp" #include "thread_pool.hpp"
#include "timer_context.hpp" #include "timer_context.hpp"
namespace jessilib { namespace jessilib {

0
src/include/app_parameters.hpp → src/include/jessilib/app_parameters.hpp

0
src/include/asio.hpp → src/include/jessilib/asio.hpp

0
src/include/assert.hpp → src/include/jessilib/assert.hpp

0
src/include/config.hpp → src/include/jessilib/config.hpp

0
src/include/duration.hpp → src/include/jessilib/duration.hpp

2
src/include/io/ansi/ansi_text.hpp → src/include/jessilib/io/ansi/ansi_text.hpp

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "io/message.hpp" #include "jessilib/io/message.hpp"
namespace jessilib { namespace jessilib {
namespace io { namespace io {

2
src/include/io/color.hpp → src/include/jessilib/io/color.hpp

@ -23,7 +23,7 @@
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <fmt/format.h> #include <fmt/format.h>
#include "util.hpp" #include "jessilib/util.hpp"
namespace jessilib { namespace jessilib {
namespace io { namespace io {

0
src/include/io/command.hpp → src/include/jessilib/io/command.hpp

2
src/include/io/command_context.hpp → src/include/jessilib/io/command_context.hpp

@ -19,7 +19,7 @@
#pragma once #pragma once
#include <string_view> #include <string_view>
#include "object.hpp" #include "jessilib/object.hpp"
#include "message.hpp" #include "message.hpp"
namespace jessilib { namespace jessilib {

0
src/include/io/command_manager.hpp → src/include/jessilib/io/command_manager.hpp

0
src/include/io/irc/irc_text.hpp → src/include/jessilib/io/irc/irc_text.hpp

0
src/include/io/message.hpp → src/include/jessilib/io/message.hpp

0
src/include/object.hpp → src/include/jessilib/object.hpp

0
src/include/parser.hpp → src/include/jessilib/parser.hpp

2
src/include/parsers/json.hpp → src/include/jessilib/parsers/json.hpp

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "parser.hpp" #include "jessilib/parser.hpp"
namespace jessilib { namespace jessilib {

0
src/include/serialize.hpp → src/include/jessilib/serialize.hpp

0
src/include/split.hpp → src/include/jessilib/split.hpp

0
src/include/thread_pool.hpp → src/include/jessilib/thread_pool.hpp

0
src/include/timer.hpp → src/include/jessilib/timer.hpp

0
src/include/type_traits.hpp → src/include/jessilib/type_traits.hpp

0
src/include/unicode.hpp → src/include/jessilib/unicode.hpp

0
src/include/util.hpp → src/include/jessilib/util.hpp

2
src/test/app_parameters.cpp

@ -17,7 +17,7 @@
*/ */
#include "test.hpp" #include "test.hpp"
#include "app_parameters.hpp" #include "jessilib/app_parameters.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

4
src/test/config.cpp

@ -20,8 +20,8 @@
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>
#include "test.hpp" #include "test.hpp"
#include "config.hpp" #include "jessilib/config.hpp"
#include "serialize.hpp" // format_not_available #include "jessilib/serialize.hpp" // format_not_available
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

2
src/test/duration.cpp

@ -16,7 +16,7 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include "duration.hpp" #include "jessilib/duration.hpp"
#include "test.hpp" #include "test.hpp"
using namespace jessilib; using namespace jessilib;

2
src/test/io/color.cpp

@ -16,7 +16,7 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include "io/color.hpp" #include "jessilib/io/color.hpp"
#include "test.hpp" #include "test.hpp"
using namespace jessilib; using namespace jessilib;

3
src/test/object.cpp

@ -16,9 +16,8 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include <chrono>
#include "test.hpp" #include "test.hpp"
#include "object.hpp" #include "jessilib/object.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

5
src/test/parser.cpp

@ -16,11 +16,10 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include <chrono>
#include <functional> #include <functional>
#include "test.hpp" #include "test.hpp"
#include "parser.hpp" #include "jessilib/parser.hpp"
#include "serialize.hpp" #include "jessilib/serialize.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

2
src/test/parsers/json.cpp

@ -17,7 +17,7 @@
*/ */
#include "test.hpp" #include "test.hpp"
#include "parsers/json.hpp" #include "jessilib/parsers/json.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

2
src/test/split.cpp

@ -16,8 +16,6 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include "split.hpp"
#include <cassert>
#include "test_split.hpp" #include "test_split.hpp"
using namespace jessilib; using namespace jessilib;

2
src/test/split_compilation.cpp

@ -20,7 +20,7 @@
* Tests which exist solely test test compilation for split.hpp, because MSVC demands /bigobj, and I don't want to * Tests which exist solely test test compilation for split.hpp, because MSVC demands /bigobj, and I don't want to
*/ */
#include "split.hpp" #include "jessilib/split.hpp"
#include <deque> #include <deque>
#include <list> #include <list>
#include "test_split.hpp" #include "test_split.hpp"

2
src/test/test_split.hpp

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "split.hpp" #include "jessilib/split.hpp"
#include "test.hpp" #include "test.hpp"
#include <random> #include <random>

2
src/test/thread_pool.cpp

@ -18,7 +18,7 @@
#include <chrono> #include <chrono>
#include "test.hpp" #include "test.hpp"
#include "thread_pool.hpp" #include "jessilib/thread_pool.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

2
src/test/timer.cpp

@ -18,7 +18,7 @@
#include <future> #include <future>
#include "test.hpp" #include "test.hpp"
#include "timer.hpp" #include "jessilib/timer.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

2
src/test/unicode.cpp

@ -16,7 +16,7 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include "unicode.hpp" #include "jessilib/unicode.hpp"
#include "test.hpp" #include "test.hpp"
using namespace jessilib; using namespace jessilib;

3
src/test/util.cpp

@ -16,9 +16,8 @@
* Written by Jessica James <jessica.aj@outlook.com> * Written by Jessica James <jessica.aj@outlook.com>
*/ */
#include "util.hpp" #include "jessilib/util.hpp"
#include "test.hpp" #include "test.hpp"
#include "object.hpp"
using namespace jessilib; using namespace jessilib;
using namespace std::literals; using namespace std::literals;

Loading…
Cancel
Save