Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move include/ to include/ppplugin/ #15

Merged
merged 5 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/configurable_plugin/configurable_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "configurable_plugin.h"

#include <atomic>

#include <boost/dll/alias.hpp>

BOOST_DLL_ALIAS(ConfigurablePluginA::create, create_a);
Expand Down
7 changes: 4 additions & 3 deletions examples/configurable_plugin/configurable_plugin_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include "configurable_plugin.h"
#include "cpp/plugin.h"
#include "plugin_manager.h"
#include <atomic>
#include <chrono>
#include <cstdlib>
Expand All @@ -10,6 +7,10 @@
#include <memory>
#include <thread>

#include "configurable_plugin.h"
#include "ppplugin/cpp/plugin.h"
#include "ppplugin/plugin_manager.h"

int main(int argc, char* argv[])
{
try {
Expand Down
6 changes: 3 additions & 3 deletions examples/lua_plugin/lua_plugin_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include "lua/plugin.h"
#include "plugin_manager.h"

#include <exception>
#include <filesystem>
#include <iostream>
Expand All @@ -9,6 +6,9 @@
#include <utility>
#include <vector>

#include "ppplugin/lua/plugin.h"
#include "ppplugin/plugin_manager.h"

int main(int argc, char* argv[])
{
try {
Expand Down
10 changes: 5 additions & 5 deletions examples/multi_language_plugin/multi_language_plugin_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#include "errors.h"
#include "noop_plugin.h"
#include "plugin.h"
#include "plugin_manager.h"

#include <chrono>
#include <exception>
#include <filesystem>
Expand All @@ -12,6 +7,11 @@
#include <utility>
#include <vector>

#include "ppplugin/errors.h"
#include "ppplugin/noop_plugin.h"
#include "ppplugin/plugin.h"
#include "ppplugin/plugin_manager.h"

int main(int argc, char* argv[])
{
if (argc < 1) {
Expand Down
3 changes: 2 additions & 1 deletion examples/multi_language_plugin/plugins/cpp_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <boost/dll/alias.hpp>
#include <iostream>

#include <boost/dll/alias.hpp>

void initialize()
{
std::cout << "C++ initialize" << '\n';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "plugin_manager.h"

#include <exception>
#include <filesystem>
#include <iostream>
#include <tuple>

#include "ppplugin/plugin_manager.h"

int main(int argc, char* argv[])
{
try {
Expand Down
6 changes: 3 additions & 3 deletions examples/python_plugin/python_plugin_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#include "plugin_manager.h"
#include "python/plugin.h"

#include <exception>
#include <filesystem>
#include <iostream>
Expand All @@ -10,6 +7,9 @@
#include <utility>
#include <vector>

#include "ppplugin/plugin_manager.h"
#include "ppplugin/python/plugin.h"

int main(int argc, char* argv[])
{
try {
Expand Down
7 changes: 4 additions & 3 deletions examples/simple_plugin/simple_plugin_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
#include <string_view>
#include <thread>

#include "cpp/plugin.h"
#include "errors.h"
#include "plugin_manager.h"
#include "ppplugin/cpp/plugin.h"
#include "ppplugin/errors.h"
#include "ppplugin/plugin_manager.h"

#include "simple_plugin.h"

void printError(std::string_view function_name, const ppplugin::CallError& error)
Expand Down
4 changes: 2 additions & 2 deletions include/c/plugin.h → include/ppplugin/c/plugin.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef PPPLUGIN_C_PLUGIN_H
#define PPPLUGIN_C_PLUGIN_H

#include "detail/boost_dll_loader.h"
#include "errors.h"
#include "ppplugin/detail/boost_dll_loader.h"
#include "ppplugin/errors.h"

namespace ppplugin {
class CPlugin {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions include/cpp/plugin.h → include/ppplugin/cpp/plugin.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef PPPLUGIN_CPP_PLUGIN_H
#define PPPLUGIN_CPP_PLUGIN_H

#include "detail/boost_dll_loader.h"
#include "errors.h"
#include "ppplugin/detail/boost_dll_loader.h"
#include "ppplugin/errors.h"

#include <boost/dll.hpp>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PPPLUGIN_DETAIL_BOOST_DLL_LOADER_H
#define PPPLUGIN_DETAIL_BOOST_DLL_LOADER_H

#include "errors.h"
#include "ppplugin/errors.h"

#include <boost/dll.hpp>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PPPLUGIN_DETAIL_FUNCTION_DETAILS_H
#define PPPLUGIN_DETAIL_FUNCTION_DETAILS_H

#include "detail/template_helpers.h"
#include "ppplugin/detail/template_helpers.h"

#include <tuple>

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions include/errors.h → include/ppplugin/errors.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef PPPLUGIN_ERRORS_H
#define PPPLUGIN_ERRORS_H

#include "detail/compatibility_utils.h"
#include "expected.h"
#include "ppplugin/detail/compatibility_utils.h"
#include "ppplugin/expected.h"

#include <memory>
#ifndef PPPLUGIN_CPP17_COMPATIBILITY
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef PPPLUGIN_LUA_SCRIPT_H
#define PPPLUGIN_LUA_SCRIPT_H

#include "errors.h"
#include "expected.h"
#include "lua_state.h"
#include "ppplugin/errors.h"
#include "ppplugin/expected.h"

#include <filesystem>
#include <optional>
Expand Down
6 changes: 3 additions & 3 deletions include/lua/lua_state.h → include/ppplugin/lua/lua_state.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef PPPLUGIN_LUA_STATE_H
#define PPPLUGIN_LUA_STATE_H

#include "detail/compatibility_utils.h"
#include "detail/function_details.h"
#include "errors.h"
#include "lua_helpers.h"
#include "ppplugin/detail/compatibility_utils.h"
#include "ppplugin/detail/function_details.h"
#include "ppplugin/errors.h"

#include <functional>
#include <optional>
Expand Down
4 changes: 2 additions & 2 deletions include/lua/plugin.h → include/ppplugin/lua/plugin.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef PPPLUGIN_LUA_PLUGIN_H
#define PPPLUGIN_LUA_PLUGIN_H

#include "errors.h"
#include "lua/lua_script.h"
#include "lua_script.h"
#include "ppplugin/errors.h"

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion include/noop_plugin.h → include/ppplugin/noop_plugin.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PPPLUGIN_NOOP_PLUGIN_H
#define PPPLUGIN_NOOP_PLUGIN_H

#include "errors.h"
#include "ppplugin/errors.h"

#include <string_view>

Expand Down
16 changes: 8 additions & 8 deletions include/plugin.h → include/ppplugin/plugin.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef PPPLUGIN_PLUGIN_H
#define PPPLUGIN_PLUGIN_H

#include "c/plugin.h"
#include "cpp/plugin.h"
#include "errors.h"
#include "lua/plugin.h"
#include "noop_plugin.h"
#include "python/plugin.h"

#include "detail/template_helpers.h"
#include "ppplugin/c/plugin.h"
#include "ppplugin/cpp/plugin.h"
#include "ppplugin/errors.h"
#include "ppplugin/lua/plugin.h"
#include "ppplugin/noop_plugin.h"
#include "ppplugin/python/plugin.h"

#include "ppplugin/detail/template_helpers.h"

#include <boost/dll.hpp>

Expand Down
16 changes: 8 additions & 8 deletions include/plugin_manager.h → include/ppplugin/plugin_manager.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef PPPLUGIN_PLUGIN_MANAGER_H
#define PPPLUGIN_PLUGIN_MANAGER_H

#include "c/plugin.h"
#include "cpp/plugin.h"
#include "detail/template_helpers.h"
#include "errors.h"
#include "expected.h"
#include "lua/plugin.h"
#include "plugin.h"
#include "python/plugin.h"
#include "ppplugin/c/plugin.h"
#include "ppplugin/cpp/plugin.h"
#include "ppplugin/detail/template_helpers.h"
#include "ppplugin/errors.h"
#include "ppplugin/expected.h"
#include "ppplugin/lua/plugin.h"
#include "ppplugin/plugin.h"
#include "ppplugin/python/plugin.h"

#include <boost/dll.hpp>

Expand Down
8 changes: 4 additions & 4 deletions include/python/plugin.h → include/ppplugin/python/plugin.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef PPPLUGIN_PYTHON_PLUGIN_H
#define PPPLUGIN_PYTHON_PLUGIN_H

#include "detail/function_details.h"
#include "errors.h"
#include "expected.h"
#include "python/python_interpreter.h"
#include "ppplugin/detail/function_details.h"
#include "ppplugin/errors.h"
#include "ppplugin/expected.h"
#include "ppplugin/python/python_interpreter.h"

#include <filesystem>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef PPPLUGIN_PYTHON_INTERPRETER_H
#define PPPLUGIN_PYTHON_INTERPRETER_H

#include "errors.h"
#include "python/python_guard.h"
#include "ppplugin/errors.h"
#include "python_forward_defs.h"
#include "python_guard.h"
#include "python_object.h"
#include "python_tuple.h"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "python_object.h"

#include <cstddef>
#include <memory>
#include <string>
#include <string_view>

Expand Down
6 changes: 2 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ target_link_libraries(
${LIBRARY_TARGET}
PUBLIC Boost::filesystem
PUBLIC Python::Python
PRIVATE ${LUA_LIBRARIES})
if(${PPPLUGIN_ENABLE_CPP17_COMPATIBILITY})
target_link_libraries(${LIBRARY_TARGET} PUBLIC fmt::fmt)
endif()
PRIVATE ${LUA_LIBRARIES}
PUBLIC $<$<BOOL:${PPPLUGIN_ENABLE_CPP17_COMPATIBILITY}>:fmt::fmt>)
target_include_directories(
${LIBRARY_TARGET}
PRIVATE ${LUA_INCLUDE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/boost_dll_loader.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "errors.h"
#include "ppplugin/errors.h"

#include <exception>
#include <filesystem>
Expand Down
10 changes: 5 additions & 5 deletions src/lua_script.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "lua/lua_script.h"
#include "detail/compatibility_utils.h"
#include "errors.h"
#include "expected.h"
#include "lua/lua_state.h"
#include "ppplugin/lua/lua_script.h"
#include "ppplugin/detail/compatibility_utils.h"
#include "ppplugin/errors.h"
#include "ppplugin/expected.h"
#include "ppplugin/lua/lua_state.h"

#include <filesystem>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion src/lua_state.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "lua/lua_state.h"
#include "ppplugin/lua/lua_state.h"

#include <cstddef>
#include <optional>
Expand Down
6 changes: 3 additions & 3 deletions src/python_exception.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "python/python_exception.h"
#include "detail/compatibility_utils.h"
#include "python/python_object.h"
#include "ppplugin/python/python_exception.h"
#include "ppplugin/detail/compatibility_utils.h"
#include "ppplugin/python/python_object.h"

#include <cassert>
#include <optional>
Expand Down
4 changes: 2 additions & 2 deletions src/python_guard.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "python/python_guard.h"
#include "python/python_forward_defs.h"
#include "ppplugin/python/python_guard.h"
#include "ppplugin/python/python_forward_defs.h"

#define PY_SSIZE_T_CLEAN
#include <Python.h> // NOLINT(misc-include-cleaner)
Expand Down
12 changes: 6 additions & 6 deletions src/python_interpreter.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "python/python_interpreter.h"
#include "errors.h"
#include "python/python_exception.h"
#include "python/python_forward_defs.h"
#include "python/python_guard.h"
#include "python/python_object.h"
#include "ppplugin/python/python_interpreter.h"
#include "ppplugin/errors.h"
#include "ppplugin/python/python_exception.h"
#include "ppplugin/python/python_forward_defs.h"
#include "ppplugin/python/python_guard.h"
#include "ppplugin/python/python_object.h"

#include <cassert>
#include <cstdio>
Expand Down
2 changes: 1 addition & 1 deletion src/python_object.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "python/python_object.h"
#include "ppplugin/python/python_object.h"

#include <optional>
#include <string>
Expand Down
6 changes: 3 additions & 3 deletions src/python_plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "errors.h"
#include "expected.h"
#include "python/plugin.h"
#include "ppplugin/errors.h"
#include "ppplugin/expected.h"
#include "ppplugin/python/plugin.h"

#include <filesystem>

Expand Down
4 changes: 2 additions & 2 deletions src/python_tuple.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "python/python_tuple.h"
#include "python/python_forward_defs.h"
#include "ppplugin/python/python_tuple.h"
#include "ppplugin/python/python_forward_defs.h"

#include <cassert>
#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion test/detail_templates_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "detail/template_helpers.h"
#include "ppplugin/detail/template_helpers.h"

#include <memory>
#include <tuple>
Expand Down
Loading