mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Use underscore plugin artifact names
Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -88,8 +88,8 @@ namespace geom {
|
||||
|
||||
private:
|
||||
struct entry {
|
||||
mapping_fn fn_;
|
||||
ifcopenshell::plugin::module module_;
|
||||
mapping_fn fn_;
|
||||
};
|
||||
|
||||
std::map<std::string, entry> entries_;
|
||||
|
||||
@@ -31,7 +31,7 @@ PLUGIN_API std::filesystem::path add_search_paths_or_default(manager& manager, s
|
||||
}
|
||||
|
||||
namespace {
|
||||
constexpr const char* kernel_plugin_prefix = "geometry.kernel.";
|
||||
constexpr const char* kernel_plugin_prefix = "geometry_kernel_";
|
||||
|
||||
std::string kernel_plugin_name(const std::string& backend_id) {
|
||||
auto name = boost::to_lower_copy(backend_id);
|
||||
|
||||
@@ -37,7 +37,7 @@ PLUGIN_API std::filesystem::path add_search_paths_or_default(manager& manager, s
|
||||
}
|
||||
|
||||
namespace {
|
||||
constexpr const char* kernel_plugin_prefix = "geometry.kernel.";
|
||||
constexpr const char* kernel_plugin_prefix = "geometry_kernel_";
|
||||
|
||||
std::string kernel_key(const std::string& backend_id) {
|
||||
return boost::to_lower_copy(backend_id);
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace ifcopenshell {
|
||||
|
||||
private:
|
||||
struct entry {
|
||||
ifcopenshell::plugin::module module_;
|
||||
kernel_info info_;
|
||||
create_fn create_;
|
||||
ifcopenshell::plugin::module module_;
|
||||
};
|
||||
|
||||
std::map<std::string, entry> entries_;
|
||||
|
||||
@@ -34,7 +34,7 @@ foreach(kernel ${GEOMETRY_KERNELS})
|
||||
|
||||
set_target_properties(${KERNEL_TARGET} PROPERTIES
|
||||
COMPILE_FLAGS "-DIFC_GEOMLIBRARY_EXPORTS"
|
||||
OUTPUT_NAME "ifcopenshell.geometry.kernel.${kernel}"
|
||||
OUTPUT_NAME "ifcopenshell_geometry_kernel_${kernel}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${kernel_plugin_runtime_dir}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${kernel_plugin_runtime_dir}"
|
||||
)
|
||||
@@ -56,7 +56,7 @@ foreach(kernel ${GEOMETRY_KERNELS})
|
||||
|
||||
set_target_properties(${KERNEL_TARGET_SIMPLE} PROPERTIES
|
||||
COMPILE_FLAGS "-DIFC_GEOMLIBRARY_EXPORTS -DIFOPSH_SIMPLE_KERNEL -DCGAL_HAS_THREADS"
|
||||
OUTPUT_NAME "ifcopenshell.geometry.kernel.cgalsimple"
|
||||
OUTPUT_NAME "ifcopenshell_geometry_kernel_cgalsimple"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${kernel_plugin_runtime_dir}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${kernel_plugin_runtime_dir}"
|
||||
)
|
||||
@@ -85,7 +85,7 @@ foreach(kernel ${GEOMETRY_KERNELS})
|
||||
endif()
|
||||
set_target_properties(${TREE_TARGET} PROPERTIES
|
||||
COMPILE_FLAGS "-DIFC_GEOMLIBRARY_EXPORTS"
|
||||
OUTPUT_NAME "ifcopenshell.geometry.tree.opencascade.${tree_backend}"
|
||||
OUTPUT_NAME "ifcopenshell_geometry_tree_opencascade_${tree_backend}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${kernel_plugin_runtime_dir}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${kernel_plugin_runtime_dir}"
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ foreach(schema ${SCHEMA_VERSIONS})
|
||||
add_library(geometry_mapping_ifc${schema} SHARED ${IFCGEOM_FILES})
|
||||
set_target_properties(geometry_mapping_ifc${schema} PROPERTIES
|
||||
COMPILE_FLAGS "-DIfcSchema=Ifc${schema}"
|
||||
OUTPUT_NAME "ifcopenshell.geometry.mapping.ifc${schema}"
|
||||
OUTPUT_NAME "ifcopenshell_geometry_mapping_ifc${schema}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${mapping_plugin_runtime_dir}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${mapping_plugin_runtime_dir}"
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ PLUGIN_API std::filesystem::path add_search_paths_or_default(manager& manager, s
|
||||
}
|
||||
|
||||
namespace {
|
||||
constexpr const char* mapping_plugin_prefix = "geometry.mapping.";
|
||||
constexpr const char* mapping_plugin_prefix = "geometry_mapping_";
|
||||
}
|
||||
|
||||
const char* ifcopenshell::geom::impl::mapping_plugin_registration_symbol() {
|
||||
|
||||
@@ -28,7 +28,7 @@ PLUGIN_API std::filesystem::path add_search_paths_or_default(manager& manager, s
|
||||
}
|
||||
|
||||
namespace {
|
||||
constexpr const char* opencascade_geometry_ifc_writer_plugin_prefix = "geometry.writer.";
|
||||
constexpr const char* opencascade_geometry_ifc_writer_plugin_prefix = "geometry_writer_";
|
||||
}
|
||||
|
||||
const char* ifcopenshell::geom::opencascade_geometry_ifc_writer_plugin_registration_symbol() {
|
||||
|
||||
@@ -5,7 +5,7 @@ foreach(schema ${SCHEMA_VERSIONS})
|
||||
target_link_libraries(geometry_serializer_ifc${schema} PRIVATE plugin geometry_serializer IfcGeom IfcParse parse_schema_ifc${schema} ${OpenCASCADE_LIBRARIES})
|
||||
set_target_properties(geometry_serializer_ifc${schema} PROPERTIES
|
||||
COMPILE_FLAGS "-DIfcSchema=Ifc${schema}"
|
||||
OUTPUT_NAME "ifcopenshell.geometry.writer.ifc${schema}"
|
||||
OUTPUT_NAME "ifcopenshell_geometry_writer_ifc${schema}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${geometry_serialization_plugin_runtime_dir}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${geometry_serialization_plugin_runtime_dir}"
|
||||
)
|
||||
|
||||
@@ -29,9 +29,9 @@ public:
|
||||
|
||||
private:
|
||||
struct entry {
|
||||
ifcopenshell::plugin::module module_;
|
||||
serialise_fn serialise_;
|
||||
tesselate_fn tesselate_;
|
||||
ifcopenshell::plugin::module module_;
|
||||
};
|
||||
|
||||
std::map<std::string, entry> entries_;
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace ifcopenshell {
|
||||
namespace plugin {
|
||||
PLUGIN_API std::filesystem::path add_search_paths_or_default(manager& manager, std::filesystem::path (*default_search_path)());
|
||||
@@ -28,7 +30,13 @@ PLUGIN_API std::filesystem::path add_search_paths_or_default(manager& manager, s
|
||||
}
|
||||
|
||||
namespace {
|
||||
constexpr const char* tree_plugin_prefix = "geometry.tree.";
|
||||
constexpr const char* tree_plugin_prefix = "geometry_tree_";
|
||||
|
||||
std::string tree_plugin_name(const std::string& backend_id) {
|
||||
auto name = boost::to_lower_copy(backend_id);
|
||||
std::replace(name.begin(), name.end(), '.', '_');
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
const char* ifcopenshell::geom::trees::tree_plugin_registration_symbol() {
|
||||
@@ -38,7 +46,7 @@ const char* ifcopenshell::geom::trees::tree_plugin_registration_symbol() {
|
||||
ifcopenshell::plugin::metadata ifcopenshell::geom::trees::tree_plugin_metadata(const std::string& plugin_name) {
|
||||
plugin::metadata metadata;
|
||||
metadata.kind_ = plugin::kind::tree;
|
||||
metadata.id = std::string(tree_plugin_prefix) + plugin_name;
|
||||
metadata.id = std::string(tree_plugin_prefix) + tree_plugin_name(plugin_name);
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@@ -65,7 +73,7 @@ bool ifcopenshell::geom::trees::load_tree_plugin(tree_registry& registry, const
|
||||
plugin::manager manager;
|
||||
plugin::add_search_paths_or_default(manager, &tree_plugin_directory);
|
||||
|
||||
const auto plugin_name = boost::to_lower_copy(backend_id);
|
||||
const auto plugin_name = tree_plugin_name(backend_id);
|
||||
const auto basename = std::string(tree_plugin_prefix) + plugin_name;
|
||||
|
||||
for (const auto& path : manager.discover_exact(basename)) {
|
||||
|
||||
@@ -81,9 +81,9 @@ namespace ifcopenshell {
|
||||
|
||||
private:
|
||||
struct entry {
|
||||
ifcopenshell::plugin::module module_;
|
||||
tree_info info_;
|
||||
create_fn create_;
|
||||
ifcopenshell::plugin::module module_;
|
||||
};
|
||||
|
||||
std::map<std::string, entry> entries_;
|
||||
|
||||
Reference in New Issue
Block a user