diff --git a/Modules/private/PhlexSymbolVisibility.cmake b/Modules/private/PhlexSymbolVisibility.cmake index 88443af14..56afeee18 100644 --- a/Modules/private/PhlexSymbolVisibility.cmake +++ b/Modules/private/PhlexSymbolVisibility.cmake @@ -2,7 +2,10 @@ include(GenerateExportHeader) function(phlex_apply_symbol_visibility target) set(EXPORT_HEADER "${PROJECT_BINARY_DIR}/include/phlex/${target}_export.hpp") - set(EXPORT_MACRO_NAME "${target}_EXPORT") + + # Macro names follow the "UPPER_CASE" convention as described in the .clang-tidy file. + string(TOUPPER "${target}" target_upper) + set(EXPORT_MACRO_NAME "${target_upper}_EXPORT") generate_export_header( ${target} @@ -10,6 +13,7 @@ function(phlex_apply_symbol_visibility target) EXPORT_FILE_NAME ${EXPORT_HEADER} EXPORT_MACRO_NAME ${EXPORT_MACRO_NAME} STATIC_DEFINE "${target}_STATIC_DEFINE" + INCLUDE_GUARD_NAME "${target_upper}_EXPORT_HPP" ) if(PHLEX_HIDE_SYMBOLS) diff --git a/phlex/app/load_module.hpp b/phlex/app/load_module.hpp index 054226342..6ebab477f 100644 --- a/phlex/app/load_module.hpp +++ b/phlex/app/load_module.hpp @@ -12,17 +12,17 @@ namespace phlex::experimental { namespace detail { // Adjust_config adds the module_label as a parameter, and it checks if the 'py' // parameter exists, inserting the 'cpp: "pymodule"' configuration if necessary. - run_phlex_EXPORT boost::json::object adjust_config(std::string const& label, + RUN_PHLEX_EXPORT boost::json::object adjust_config(std::string const& label, boost::json::object raw_config); } - run_phlex_EXPORT void load_module(framework_graph& g, + RUN_PHLEX_EXPORT void load_module(framework_graph& g, std::string const& label, boost::json::object config); - run_phlex_EXPORT void load_source(framework_graph& g, + RUN_PHLEX_EXPORT void load_source(framework_graph& g, std::string const& label, boost::json::object config); - run_phlex_EXPORT driver_bundle load_driver(boost::json::object const& config); + RUN_PHLEX_EXPORT driver_bundle load_driver(boost::json::object const& config); } #endif // PHLEX_APP_LOAD_MODULE_HPP diff --git a/phlex/app/run.hpp b/phlex/app/run.hpp index af4ab113f..d2d487a8e 100644 --- a/phlex/app/run.hpp +++ b/phlex/app/run.hpp @@ -8,7 +8,7 @@ #include namespace phlex::experimental { - run_phlex_EXPORT void run(boost::json::object const& configurations, int max_parallelism); + RUN_PHLEX_EXPORT void run(boost::json::object const& configurations, int max_parallelism); } #endif // PHLEX_APP_RUN_HPP diff --git a/phlex/app/version.hpp b/phlex/app/version.hpp index dfb9b93cc..cfa426e4f 100644 --- a/phlex/app/version.hpp +++ b/phlex/app/version.hpp @@ -4,6 +4,6 @@ #include "phlex/run_phlex_export.hpp" namespace phlex::experimental { - run_phlex_EXPORT char const* version(); + RUN_PHLEX_EXPORT char const* version(); } #endif // PHLEX_APP_VERSION_HPP diff --git a/phlex/concurrency.hpp b/phlex/concurrency.hpp index c5bb9c86e..8e3fc170e 100644 --- a/phlex/concurrency.hpp +++ b/phlex/concurrency.hpp @@ -6,9 +6,9 @@ #include namespace phlex { - struct phlex_core_EXPORT concurrency { - static phlex_core_EXPORT concurrency const unlimited; - static phlex_core_EXPORT concurrency const serial; + struct PHLEX_CORE_EXPORT concurrency { + static PHLEX_CORE_EXPORT concurrency const unlimited; + static PHLEX_CORE_EXPORT concurrency const serial; std::size_t value; }; diff --git a/phlex/configuration.hpp b/phlex/configuration.hpp index 1a5ec1ef0..b05405462 100644 --- a/phlex/configuration.hpp +++ b/phlex/configuration.hpp @@ -24,7 +24,7 @@ namespace phlex { } // Used later for product_query - phlex_configuration_internal_EXPORT std::optional + PHLEX_CONFIGURATION_INTERNAL_EXPORT std::optional value_if_exists(boost::json::object const& obj, std::string_view parameter); // helper for unpacking json array @@ -36,7 +36,7 @@ namespace phlex { } } - class phlex_configuration_internal_EXPORT configuration { + class PHLEX_CONFIGURATION_INTERNAL_EXPORT configuration { public: configuration() = default; explicit configuration(boost::json::object const& config) : config_{config} {} @@ -91,14 +91,14 @@ namespace phlex { // To enable direct conversions from Boost JSON types to our own types, we implement // tag_invoke(...) function overloads, which are the customization points Boost JSON // provides. - phlex_configuration_internal_EXPORT configuration + PHLEX_CONFIGURATION_INTERNAL_EXPORT configuration tag_invoke(boost::json::value_to_tag const&, boost::json::value const& jv); - phlex_configuration_internal_EXPORT product_query + PHLEX_CONFIGURATION_INTERNAL_EXPORT product_query tag_invoke(boost::json::value_to_tag const&, boost::json::value const& jv); namespace experimental { - phlex_configuration_internal_EXPORT identifier + PHLEX_CONFIGURATION_INTERNAL_EXPORT identifier tag_invoke(boost::json::value_to_tag const&, boost::json::value const& jv); } diff --git a/phlex/core/consumer.hpp b/phlex/core/consumer.hpp index bc4c70a00..fd8e85319 100644 --- a/phlex/core/consumer.hpp +++ b/phlex/core/consumer.hpp @@ -9,7 +9,7 @@ #include namespace phlex::experimental { - class phlex_core_EXPORT consumer { + class PHLEX_CORE_EXPORT consumer { public: consumer(algorithm_name name, std::vector predicates); diff --git a/phlex/core/declared_fold.hpp b/phlex/core/declared_fold.hpp index 9b794896c..44d0ae8b9 100644 --- a/phlex/core/declared_fold.hpp +++ b/phlex/core/declared_fold.hpp @@ -36,7 +36,7 @@ #include namespace phlex::experimental { - class phlex_core_EXPORT declared_fold : public products_consumer { + class PHLEX_CORE_EXPORT declared_fold : public products_consumer { public: declared_fold(algorithm_name name, std::vector predicates, diff --git a/phlex/core/declared_observer.hpp b/phlex/core/declared_observer.hpp index 8b26f3b7c..4a70f26f4 100644 --- a/phlex/core/declared_observer.hpp +++ b/phlex/core/declared_observer.hpp @@ -32,7 +32,7 @@ namespace phlex::experimental { - class phlex_core_EXPORT declared_observer : public products_consumer { + class PHLEX_CORE_EXPORT declared_observer : public products_consumer { public: declared_observer(algorithm_name name, std::vector predicates, diff --git a/phlex/core/declared_output.hpp b/phlex/core/declared_output.hpp index 4e2643583..b6df572f3 100644 --- a/phlex/core/declared_output.hpp +++ b/phlex/core/declared_output.hpp @@ -22,7 +22,7 @@ namespace phlex::experimental { namespace detail { using output_function_t = std::function; } - class phlex_core_EXPORT declared_output : public consumer { + class PHLEX_CORE_EXPORT declared_output : public consumer { public: declared_output(algorithm_name name, std::size_t concurrency, diff --git a/phlex/core/declared_predicate.hpp b/phlex/core/declared_predicate.hpp index c76697114..82334667b 100644 --- a/phlex/core/declared_predicate.hpp +++ b/phlex/core/declared_predicate.hpp @@ -34,7 +34,7 @@ namespace phlex::experimental { - class phlex_core_EXPORT declared_predicate : public products_consumer { + class PHLEX_CORE_EXPORT declared_predicate : public products_consumer { public: declared_predicate(algorithm_name name, std::vector predicates, diff --git a/phlex/core/declared_provider.hpp b/phlex/core/declared_provider.hpp index 9ade62ef1..0d1fbd5c7 100644 --- a/phlex/core/declared_provider.hpp +++ b/phlex/core/declared_provider.hpp @@ -24,7 +24,7 @@ namespace phlex::experimental { - class phlex_core_EXPORT declared_provider { + class PHLEX_CORE_EXPORT declared_provider { public: declared_provider(algorithm_name name, product_query output_product); virtual ~declared_provider(); diff --git a/phlex/core/declared_transform.hpp b/phlex/core/declared_transform.hpp index dc823a60d..7e64a4f33 100644 --- a/phlex/core/declared_transform.hpp +++ b/phlex/core/declared_transform.hpp @@ -38,7 +38,7 @@ namespace phlex::experimental { - class phlex_core_EXPORT declared_transform : public products_consumer { + class PHLEX_CORE_EXPORT declared_transform : public products_consumer { public: declared_transform(algorithm_name name, std::vector predicates, diff --git a/phlex/core/declared_unfold.hpp b/phlex/core/declared_unfold.hpp index 50e6fdb43..b9d2c5eff 100644 --- a/phlex/core/declared_unfold.hpp +++ b/phlex/core/declared_unfold.hpp @@ -34,7 +34,7 @@ namespace phlex::experimental { - class phlex_core_EXPORT generator { + class PHLEX_CORE_EXPORT generator { public: explicit generator(product_store_const_ptr const& parent, algorithm_name node_name, @@ -55,7 +55,7 @@ namespace phlex::experimental { std::map child_counts_; }; - class phlex_core_EXPORT declared_unfold : public products_consumer { + class PHLEX_CORE_EXPORT declared_unfold : public products_consumer { public: declared_unfold(algorithm_name name, std::vector predicates, diff --git a/phlex/core/detail/filter_impl.hpp b/phlex/core/detail/filter_impl.hpp index 75a91e448..de2a5152f 100644 --- a/phlex/core/detail/filter_impl.hpp +++ b/phlex/core/detail/filter_impl.hpp @@ -31,7 +31,7 @@ namespace phlex::experimental { return value == true_value; } - class phlex_core_EXPORT decision_map { + class PHLEX_CORE_EXPORT decision_map { using decisions_t = oneapi::tbb::concurrent_hash_map; public: @@ -49,7 +49,7 @@ namespace phlex::experimental { decisions_t results_; }; - class phlex_core_EXPORT data_map { + class PHLEX_CORE_EXPORT data_map { using stores_t = oneapi::tbb::concurrent_hash_map>; diff --git a/phlex/core/detail/make_algorithm_name.hpp b/phlex/core/detail/make_algorithm_name.hpp index b554e1b9f..207e58c73 100644 --- a/phlex/core/detail/make_algorithm_name.hpp +++ b/phlex/core/detail/make_algorithm_name.hpp @@ -16,7 +16,7 @@ namespace phlex::experimental { class algorithm_name; namespace detail { - phlex_core_EXPORT algorithm_name make_algorithm_name(configuration const* config, + PHLEX_CORE_EXPORT algorithm_name make_algorithm_name(configuration const* config, std::string_view name); } } diff --git a/phlex/core/detail/maybe_predicates.hpp b/phlex/core/detail/maybe_predicates.hpp index f48c33a87..1a6b249d6 100644 --- a/phlex/core/detail/maybe_predicates.hpp +++ b/phlex/core/detail/maybe_predicates.hpp @@ -15,7 +15,7 @@ namespace phlex { } namespace phlex::experimental::detail { - phlex_core_EXPORT std::optional> maybe_predicates( + PHLEX_CORE_EXPORT std::optional> maybe_predicates( configuration const* config); } diff --git a/phlex/core/detail/repeater_node.hpp b/phlex/core/detail/repeater_node.hpp index 1b48fec9c..e74099871 100644 --- a/phlex/core/detail/repeater_node.hpp +++ b/phlex/core/detail/repeater_node.hpp @@ -17,7 +17,7 @@ namespace phlex::experimental::detail { using repeater_node_input = std::tuple; - class phlex_core_EXPORT repeater_node : + class PHLEX_CORE_EXPORT repeater_node : public tbb::flow::composite_node> { public: repeater_node(tbb::flow::graph& g, std::string node_name, identifier layer_name); diff --git a/phlex/core/edge_creation_policy.hpp b/phlex/core/edge_creation_policy.hpp index 93eb45bc1..f456aa87a 100644 --- a/phlex/core/edge_creation_policy.hpp +++ b/phlex/core/edge_creation_policy.hpp @@ -17,7 +17,7 @@ namespace phlex::experimental { using product_suffix_t = identifier; - class phlex_core_EXPORT edge_creation_policy { + class PHLEX_CORE_EXPORT edge_creation_policy { public: template edge_creation_policy(Args&... producers); diff --git a/phlex/core/edge_maker.hpp b/phlex/core/edge_maker.hpp index c5e6057b6..c9bedb832 100644 --- a/phlex/core/edge_maker.hpp +++ b/phlex/core/edge_maker.hpp @@ -27,7 +27,7 @@ namespace phlex::experimental { index_router::provider_input_ports_t make_provider_edges(index_router::head_ports_t head_ports, declared_providers& providers); - class phlex_core_EXPORT edge_maker { + class PHLEX_CORE_EXPORT edge_maker { public: template edge_maker(Args&... args); diff --git a/phlex/core/filter.hpp b/phlex/core/filter.hpp index b96b116a3..04a704b6a 100644 --- a/phlex/core/filter.hpp +++ b/phlex/core/filter.hpp @@ -14,7 +14,7 @@ namespace phlex::experimental { oneapi::tbb::flow::composite_node, std::tuple>; - class phlex_core_EXPORT filter : public filter_base { + class PHLEX_CORE_EXPORT filter : public filter_base { using indexer_t = oneapi::tbb::flow::indexer_node; using tag_t = indexer_t::output_type; diff --git a/phlex/core/framework_graph.hpp b/phlex/core/framework_graph.hpp index 532906785..fcb825d32 100644 --- a/phlex/core/framework_graph.hpp +++ b/phlex/core/framework_graph.hpp @@ -33,7 +33,7 @@ namespace phlex { } namespace phlex::experimental { - class phlex_core_EXPORT framework_graph { + class PHLEX_CORE_EXPORT framework_graph { public: explicit framework_graph(int max_parallelism = oneapi::tbb::info::default_concurrency()); explicit framework_graph(detail::next_index_t next_index, diff --git a/phlex/core/glue.hpp b/phlex/core/glue.hpp index 6bc50dd91..c1b88e3bb 100644 --- a/phlex/core/glue.hpp +++ b/phlex/core/glue.hpp @@ -25,7 +25,7 @@ namespace phlex::experimental { struct node_catalog; namespace detail { - phlex_core_EXPORT void verify_name(std::string const& name, configuration const* config); + PHLEX_CORE_EXPORT void verify_name(std::string const& name, configuration const* config); } // ============================================================================== diff --git a/phlex/core/index_router.hpp b/phlex/core/index_router.hpp index 969fc180a..4081db873 100644 --- a/phlex/core/index_router.hpp +++ b/phlex/core/index_router.hpp @@ -32,7 +32,7 @@ namespace phlex::experimental { // join operation. It: // (a) routes index messages to either the matching layer or its data-layer parent, and // (b) emits flush tokens to the repeater to evict a cached data product from memory. - class phlex_core_EXPORT multilayer_slot { + class PHLEX_CORE_EXPORT multilayer_slot { public: multilayer_slot(tbb::flow::graph& g, identifier layer, @@ -57,7 +57,7 @@ namespace phlex::experimental { // A layer_scope object is an RAII object that manages layer-scoped operations during // data-cell-index routing. It updates flush counters on construction and ensures cleanup // (flushing end tokens and releasing fold results) on destruction. - class phlex_core_EXPORT layer_scope { + class PHLEX_CORE_EXPORT layer_scope { public: layer_scope(flush_counters& counters, flusher_t& flusher, @@ -76,7 +76,7 @@ namespace phlex::experimental { }; } - class phlex_core_EXPORT index_router { + class PHLEX_CORE_EXPORT index_router { public: struct named_input_port { product_query input_product; diff --git a/phlex/core/message.hpp b/phlex/core/message.hpp index 32489a214..560b59bd0 100644 --- a/phlex/core/message.hpp +++ b/phlex/core/message.hpp @@ -46,7 +46,7 @@ namespace phlex::experimental { std::size_t id; }; - struct phlex_core_EXPORT message_matcher { + struct PHLEX_CORE_EXPORT message_matcher { std::size_t operator()(message const& msg) const noexcept; }; @@ -64,12 +64,12 @@ namespace phlex::experimental { using named_index_ports = std::vector; // Overload for use with most_derived - phlex_core_EXPORT message const& more_derived(message const& a, message const& b); + PHLEX_CORE_EXPORT message const& more_derived(message const& a, message const& b); // Non-template overload for single message case inline message const& most_derived(message const& msg) { return msg; } - phlex_core_EXPORT std::size_t port_index_for(product_queries const& input_products, + PHLEX_CORE_EXPORT std::size_t port_index_for(product_queries const& input_products, product_query const& input_product); } diff --git a/phlex/core/node_catalog.hpp b/phlex/core/node_catalog.hpp index 68051aaa5..0d661c3fb 100644 --- a/phlex/core/node_catalog.hpp +++ b/phlex/core/node_catalog.hpp @@ -19,7 +19,7 @@ #include namespace phlex::experimental { - struct phlex_core_EXPORT node_catalog { + struct PHLEX_CORE_EXPORT node_catalog { template auto registrar_for(std::vector& errors) { diff --git a/phlex/core/product_query.hpp b/phlex/core/product_query.hpp index 5014a97fe..1dfa2c8b5 100644 --- a/phlex/core/product_query.hpp +++ b/phlex/core/product_query.hpp @@ -67,7 +67,7 @@ namespace phlex { }; } - struct phlex_core_EXPORT product_query { + struct PHLEX_CORE_EXPORT product_query { detail::required_creator_name creator; detail::required_layer_name layer; std::optional suffix; @@ -126,7 +126,7 @@ namespace phlex { // This lives here rather than as a member-function of product_store because product_store is in model // and product_query in core, with core depending on model. - phlex_core_EXPORT experimental::product_specification const* resolve_in_store( + PHLEX_CORE_EXPORT experimental::product_specification const* resolve_in_store( product_query const& query, experimental::product_store const& store); } diff --git a/phlex/core/products_consumer.hpp b/phlex/core/products_consumer.hpp index e1fc0d389..7c91ead4b 100644 --- a/phlex/core/products_consumer.hpp +++ b/phlex/core/products_consumer.hpp @@ -17,7 +17,7 @@ #include namespace phlex::experimental { - class phlex_core_EXPORT products_consumer : public consumer { + class PHLEX_CORE_EXPORT products_consumer : public consumer { public: products_consumer(algorithm_name name, std::vector predicates, diff --git a/phlex/core/registrar.hpp b/phlex/core/registrar.hpp index 5dc50fef0..655c8887f 100644 --- a/phlex/core/registrar.hpp +++ b/phlex/core/registrar.hpp @@ -60,7 +60,7 @@ namespace phlex::experimental { namespace detail { - phlex_core_EXPORT void add_to_error_messages(std::vector& errors, + PHLEX_CORE_EXPORT void add_to_error_messages(std::vector& errors, std::string const& name); } diff --git a/phlex/core/registration_api.hpp b/phlex/core/registration_api.hpp index 0fb6095f8..e63632333 100644 --- a/phlex/core/registration_api.hpp +++ b/phlex/core/registration_api.hpp @@ -306,7 +306,7 @@ namespace phlex::experimental { // ==================================================================================== // Output API - class phlex_core_EXPORT output_api { + class PHLEX_CORE_EXPORT output_api { public: output_api(registrar reg, configuration const* config, diff --git a/phlex/core/store_counters.hpp b/phlex/core/store_counters.hpp index 0e97b9f56..beba19a0c 100644 --- a/phlex/core/store_counters.hpp +++ b/phlex/core/store_counters.hpp @@ -16,7 +16,7 @@ #include namespace phlex::experimental { - class phlex_core_EXPORT store_counter { + class PHLEX_CORE_EXPORT store_counter { public: void set_flush_value(flush_counts_ptr counts, std::size_t original_message_id); void increment(data_cell_index::hash_type layer_hash); @@ -37,7 +37,7 @@ namespace phlex::experimental { std::atomic ready_to_flush_{true}; }; - class phlex_core_EXPORT count_stores { + class PHLEX_CORE_EXPORT count_stores { protected: store_counter& counter_for(data_cell_index::hash_type hash); std::unique_ptr done_with(data_cell_index::hash_type hash); diff --git a/phlex/model/algorithm_name.hpp b/phlex/model/algorithm_name.hpp index 778f10803..b431ae2fa 100644 --- a/phlex/model/algorithm_name.hpp +++ b/phlex/model/algorithm_name.hpp @@ -6,7 +6,7 @@ #include "phlex/model/identifier.hpp" namespace phlex::experimental { - class phlex_model_EXPORT algorithm_name { + class PHLEX_MODEL_EXPORT algorithm_name { enum class specified_fields { neither, either, both }; public: diff --git a/phlex/model/data_cell_counter.hpp b/phlex/model/data_cell_counter.hpp index 888a7da22..8d3ec8d1a 100644 --- a/phlex/model/data_cell_counter.hpp +++ b/phlex/model/data_cell_counter.hpp @@ -14,7 +14,7 @@ #include namespace phlex::experimental { - class phlex_model_EXPORT flush_counts { + class PHLEX_MODEL_EXPORT flush_counts { public: flush_counts(); explicit flush_counts(std::map child_counts); @@ -36,7 +36,7 @@ namespace phlex::experimental { std::map child_counts_{}; }; - class phlex_model_EXPORT data_cell_counter { + class PHLEX_MODEL_EXPORT data_cell_counter { public: data_cell_counter(); data_cell_counter(data_cell_counter* parent, identifier const& layer_name); @@ -59,7 +59,7 @@ namespace phlex::experimental { std::map child_counts_{}; }; - class phlex_model_EXPORT flush_counters { + class PHLEX_MODEL_EXPORT flush_counters { public: void update(data_cell_index_ptr const id); flush_counts extract(data_cell_index_ptr const id); diff --git a/phlex/model/data_cell_index.hpp b/phlex/model/data_cell_index.hpp index ecde0d69a..084baade9 100644 --- a/phlex/model/data_cell_index.hpp +++ b/phlex/model/data_cell_index.hpp @@ -16,7 +16,7 @@ #include namespace phlex { - class phlex_model_EXPORT data_cell_index : public std::enable_shared_from_this { + class PHLEX_MODEL_EXPORT data_cell_index : public std::enable_shared_from_this { public: static data_cell_index_ptr job(); @@ -52,7 +52,7 @@ namespace phlex { hash_type hash_{0}; }; - phlex_model_EXPORT std::ostream& operator<<(std::ostream& os, data_cell_index const& id); + PHLEX_MODEL_EXPORT std::ostream& operator<<(std::ostream& os, data_cell_index const& id); } namespace std { diff --git a/phlex/model/data_layer_hierarchy.hpp b/phlex/model/data_layer_hierarchy.hpp index 426aefd37..f1128bbc7 100644 --- a/phlex/model/data_layer_hierarchy.hpp +++ b/phlex/model/data_layer_hierarchy.hpp @@ -15,7 +15,7 @@ namespace phlex::experimental { - class phlex_model_EXPORT data_layer_hierarchy { + class PHLEX_MODEL_EXPORT data_layer_hierarchy { public: ~data_layer_hierarchy(); void increment_count(data_cell_index_ptr const& id); diff --git a/phlex/model/fixed_hierarchy.hpp b/phlex/model/fixed_hierarchy.hpp index ca1127faf..86b0455d8 100644 --- a/phlex/model/fixed_hierarchy.hpp +++ b/phlex/model/fixed_hierarchy.hpp @@ -19,7 +19,7 @@ namespace phlex { class fixed_hierarchy; - class phlex_model_EXPORT data_cell_cursor { + class PHLEX_MODEL_EXPORT data_cell_cursor { public: // Validates that the child layer is part of the fixed hierarchy and yields the child // data-cell index to the underlying driver, returning a data_cell_cursor for the child. @@ -38,7 +38,7 @@ namespace phlex { experimental::async_driver& driver_; }; - class phlex_model_EXPORT fixed_hierarchy { + class PHLEX_MODEL_EXPORT fixed_hierarchy { public: fixed_hierarchy() = default; // Using an std::initializer_list removes one set of braces that the user must provide diff --git a/phlex/model/identifier.hpp b/phlex/model/identifier.hpp index cc002bcb0..c6648df2c 100644 --- a/phlex/model/identifier.hpp +++ b/phlex/model/identifier.hpp @@ -22,7 +22,7 @@ namespace phlex::experimental { /// Carries around the string itself (as a shared_ptr to string to make copies lighter) /// along with a precomputed hash used for all comparisons - class phlex_model_EXPORT identifier { + class PHLEX_MODEL_EXPORT identifier { public: static std::uint64_t hash_string(std::string_view str); // The default constructor is necessary so other classes containing identifiers @@ -60,8 +60,8 @@ namespace phlex::experimental { std::string const& trans_get_string() const noexcept { return content_; } // Comparison operators with _id queries - friend phlex_model_EXPORT bool operator==(identifier const& lhs, identifier_query rhs); - friend phlex_model_EXPORT std::strong_ordering operator<=>(identifier const& lhs, + friend PHLEX_MODEL_EXPORT bool operator==(identifier const& lhs, identifier_query rhs); + friend PHLEX_MODEL_EXPORT std::strong_ordering operator<=>(identifier const& lhs, identifier_query rhs); friend std::hash; @@ -72,8 +72,8 @@ namespace phlex::experimental { // Identifier UDL namespace literals { - phlex_model_EXPORT identifier operator""_id(char const* lit, std::size_t len); - phlex_model_EXPORT identifier_query operator""_idq(char const* lit, std::size_t len); + PHLEX_MODEL_EXPORT identifier operator""_id(char const* lit, std::size_t len); + PHLEX_MODEL_EXPORT identifier_query operator""_idq(char const* lit, std::size_t len); } // Really trying to avoid the extra function call here diff --git a/phlex/model/product_matcher.hpp b/phlex/model/product_matcher.hpp index e6f13bdef..11ad55546 100644 --- a/phlex/model/product_matcher.hpp +++ b/phlex/model/product_matcher.hpp @@ -17,7 +17,7 @@ #include namespace phlex::experimental { - class phlex_model_EXPORT product_matcher { + class PHLEX_MODEL_EXPORT product_matcher { public: explicit product_matcher(std::string matcher_spec); bool matches(product_store_const_ptr const& store) const; diff --git a/phlex/model/product_specification.hpp b/phlex/model/product_specification.hpp index a1b3dded8..065feb220 100644 --- a/phlex/model/product_specification.hpp +++ b/phlex/model/product_specification.hpp @@ -14,7 +14,7 @@ #include namespace phlex::experimental { - class phlex_model_EXPORT product_specification { + class PHLEX_MODEL_EXPORT product_specification { public: product_specification(); product_specification(char const* name); @@ -46,7 +46,7 @@ namespace phlex::experimental { using product_specifications = std::vector; - phlex_model_EXPORT product_specifications + PHLEX_MODEL_EXPORT product_specifications to_product_specifications(std::string_view name, std::vector output_suffixes, std::vector output_types); diff --git a/phlex/model/product_store.hpp b/phlex/model/product_store.hpp index be0337b5a..661aa6dd7 100644 --- a/phlex/model/product_store.hpp +++ b/phlex/model/product_store.hpp @@ -17,7 +17,7 @@ #include namespace phlex::experimental { - class phlex_model_EXPORT product_store { + class PHLEX_MODEL_EXPORT product_store { public: explicit product_store(data_cell_index_ptr id, algorithm_name source = default_source(), @@ -60,7 +60,7 @@ namespace phlex::experimental { source_; // FIXME: Should not have to copy (the source should outlive the product store) }; - phlex_model_EXPORT product_store_ptr const& more_derived(product_store_ptr const& a, + PHLEX_MODEL_EXPORT product_store_ptr const& more_derived(product_store_ptr const& a, product_store_ptr const& b); // Non-template overload for single product_store_ptr case diff --git a/phlex/model/products.hpp b/phlex/model/products.hpp index 60601423c..2f9c57f2a 100644 --- a/phlex/model/products.hpp +++ b/phlex/model/products.hpp @@ -14,7 +14,7 @@ namespace phlex::experimental { - struct phlex_model_EXPORT product_base { + struct PHLEX_MODEL_EXPORT product_base { virtual ~product_base() = default; virtual void const* address() const = 0; virtual std::type_info const& type() const = 0; @@ -34,7 +34,7 @@ namespace phlex::experimental { std::remove_cvref_t obj; }; - class phlex_model_EXPORT products { + class PHLEX_MODEL_EXPORT products { using collection_t = std::unordered_map>; public: diff --git a/phlex/utilities/hashing.hpp b/phlex/utilities/hashing.hpp index f521654ae..cd0be1eda 100644 --- a/phlex/utilities/hashing.hpp +++ b/phlex/utilities/hashing.hpp @@ -8,10 +8,10 @@ #include namespace phlex::experimental { - phlex_utilities_EXPORT std::size_t hash(std::string const& str); - phlex_utilities_EXPORT std::size_t hash(std::size_t i) noexcept; - phlex_utilities_EXPORT std::size_t hash(std::size_t i, std::size_t j); - phlex_utilities_EXPORT std::size_t hash(std::size_t i, std::string const& str); + PHLEX_UTILITIES_EXPORT std::size_t hash(std::string const& str); + PHLEX_UTILITIES_EXPORT std::size_t hash(std::size_t i) noexcept; + PHLEX_UTILITIES_EXPORT std::size_t hash(std::size_t i, std::size_t j); + PHLEX_UTILITIES_EXPORT std::size_t hash(std::size_t i, std::string const& str); template std::size_t hash(std::size_t i, std::size_t j, Ts... ks) { diff --git a/phlex/utilities/resource_usage.hpp b/phlex/utilities/resource_usage.hpp index d7b4e5b71..8317e2d6d 100644 --- a/phlex/utilities/resource_usage.hpp +++ b/phlex/utilities/resource_usage.hpp @@ -11,7 +11,7 @@ #include namespace phlex::experimental { - class phlex_utilities_EXPORT resource_usage { + class PHLEX_UTILITIES_EXPORT resource_usage { public: resource_usage() noexcept; ~resource_usage();