From 94e07d023b3ef2c5fda263dc1a8506909a232695 Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Fri, 1 Mar 2024 14:11:55 +0000 Subject: [PATCH] feat(core): use CUBOS_CORE_API everywhere --- .../cubos/core/data/des/deserializer.hpp | 3 +- core/include/cubos/core/data/des/json.hpp | 2 +- core/include/cubos/core/data/fs/archive.hpp | 2 +- .../cubos/core/data/fs/embedded_archive.hpp | 2 +- core/include/cubos/core/data/fs/file.hpp | 3 +- .../cubos/core/data/fs/file_system.hpp | 2 +- .../cubos/core/data/fs/standard_archive.hpp | 2 +- core/include/cubos/core/data/ser/debug.hpp | 2 +- core/include/cubos/core/data/ser/json.hpp | 2 +- .../cubos/core/data/ser/serializer.hpp | 3 +- core/include/cubos/core/ecs/blueprint.hpp | 6 +- .../include/cubos/core/ecs/command_buffer.hpp | 3 +- core/include/cubos/core/ecs/cubos.hpp | 8 +-- .../cubos/core/ecs/entity/archetype_graph.hpp | 2 +- .../cubos/core/ecs/entity/archetype_id.hpp | 4 +- core/include/cubos/core/ecs/entity/entity.hpp | 3 +- core/include/cubos/core/ecs/entity/hash.hpp | 4 +- core/include/cubos/core/ecs/entity/pool.hpp | 2 +- core/include/cubos/core/ecs/name.hpp | 3 +- .../cubos/core/ecs/observer/observers.hpp | 2 +- core/include/cubos/core/ecs/query/filter.hpp | 6 +- .../cubos/core/ecs/query/node/archetype.hpp | 2 +- .../cubos/core/ecs/query/node/node.hpp | 2 +- .../cubos/core/ecs/query/node/related.hpp | 2 +- core/include/cubos/core/ecs/query/term.hpp | 2 +- .../cubos/core/ecs/resource/manager.hpp | 3 +- core/include/cubos/core/ecs/system/access.hpp | 2 +- .../core/ecs/system/arguments/commands.hpp | 6 +- .../cubos/core/ecs/system/dispatcher.hpp | 2 +- core/include/cubos/core/ecs/table/column.hpp | 4 +- .../cubos/core/ecs/table/dense/registry.hpp | 2 +- .../cubos/core/ecs/table/dense/table.hpp | 2 +- .../core/ecs/table/sparse_relation/id.hpp | 4 +- .../ecs/table/sparse_relation/registry.hpp | 4 +- .../core/ecs/table/sparse_relation/table.hpp | 8 +-- core/include/cubos/core/ecs/table/tables.hpp | 2 +- core/include/cubos/core/ecs/types.hpp | 5 +- core/include/cubos/core/ecs/world.hpp | 2 +- core/include/cubos/core/geom/aabb.hpp | 3 +- core/include/cubos/core/geom/box.hpp | 3 +- core/include/cubos/core/geom/capsule.hpp | 3 +- .../include/cubos/core/geom/intersections.hpp | 6 +- core/include/cubos/core/gl/debug.hpp | 2 +- core/include/cubos/core/gl/render_device.hpp | 6 +- core/include/cubos/core/gl/util.hpp | 2 +- core/include/cubos/core/io/cursor.hpp | 5 +- core/include/cubos/core/io/gamepad.hpp | 15 ++-- core/include/cubos/core/io/keyboard.hpp | 7 +- core/include/cubos/core/io/window.hpp | 14 ++-- core/include/cubos/core/log.hpp | 4 +- core/include/cubos/core/memory/any_value.hpp | 4 +- core/include/cubos/core/memory/any_vector.hpp | 4 +- .../cubos/core/memory/buffer_stream.hpp | 2 +- core/include/cubos/core/memory/endianness.hpp | 4 +- .../cubos/core/memory/standard_stream.hpp | 2 +- core/include/cubos/core/memory/stream.hpp | 4 +- .../cubos/core/reflection/comparison.hpp | 7 +- .../core/reflection/external/cstring.hpp | 5 +- .../cubos/core/reflection/external/glm.hpp | 71 ++++++++++--------- .../core/reflection/external/primitives.hpp | 29 ++++---- .../cubos/core/reflection/external/string.hpp | 3 +- .../core/reflection/external/string_view.hpp | 3 +- .../cubos/core/reflection/external/uuid.hpp | 3 +- .../include/cubos/core/reflection/reflect.hpp | 17 +++-- .../cubos/core/reflection/traits/array.hpp | 11 +-- .../core/reflection/traits/constructible.hpp | 3 +- .../core/reflection/traits/dictionary.hpp | 11 +-- .../cubos/core/reflection/traits/enum.hpp | 7 +- .../cubos/core/reflection/traits/fields.hpp | 17 ++--- .../cubos/core/reflection/traits/mask.hpp | 13 ++-- .../cubos/core/reflection/traits/nullable.hpp | 3 +- .../reflection/traits/string_conversion.hpp | 3 +- core/include/cubos/core/reflection/type.hpp | 3 +- .../cubos/core/reflection/type_registry.hpp | 3 +- core/include/cubos/core/thread_pool.hpp | 4 +- core/tests/data/des/json.cpp | 2 +- core/tests/data/ser/json.cpp | 2 +- core/tests/reflection/reflect.cpp | 2 +- 78 files changed, 243 insertions(+), 189 deletions(-) diff --git a/core/include/cubos/core/data/des/deserializer.hpp b/core/include/cubos/core/data/des/deserializer.hpp index cd2dffaac5..b10c208d93 100644 --- a/core/include/cubos/core/data/des/deserializer.hpp +++ b/core/include/cubos/core/data/des/deserializer.hpp @@ -6,6 +6,7 @@ #include +#include #include #include @@ -23,7 +24,7 @@ namespace cubos::core::data /// at least the primitive types. /// /// @ingroup core-data-des - class Deserializer + class CUBOS_CORE_API Deserializer { public: virtual ~Deserializer() = default; diff --git a/core/include/cubos/core/data/des/json.hpp b/core/include/cubos/core/data/des/json.hpp index f0c87d7ac5..8d0f17d7ef 100644 --- a/core/include/cubos/core/data/des/json.hpp +++ b/core/include/cubos/core/data/des/json.hpp @@ -15,7 +15,7 @@ namespace cubos::core::data /// Before deserializing any data, a JSON object must be fed to the deserializer. /// /// @ingroup core-data-des - class JSONDeserializer : public Deserializer + class CUBOS_CORE_API JSONDeserializer : public Deserializer { public: /// @brief Constructs. diff --git a/core/include/cubos/core/data/fs/archive.hpp b/core/include/cubos/core/data/fs/archive.hpp index 0cebf69d18..911f4e75c3 100644 --- a/core/include/cubos/core/data/fs/archive.hpp +++ b/core/include/cubos/core/data/fs/archive.hpp @@ -35,7 +35,7 @@ namespace cubos::core::data /// @see File /// @see FileSystem /// @ingroup core-data-fs - class Archive + class CUBOS_CORE_API Archive { public: Archive() = default; diff --git a/core/include/cubos/core/data/fs/embedded_archive.hpp b/core/include/cubos/core/data/fs/embedded_archive.hpp index 0933ba6576..b496085f0f 100644 --- a/core/include/cubos/core/data/fs/embedded_archive.hpp +++ b/core/include/cubos/core/data/fs/embedded_archive.hpp @@ -26,7 +26,7 @@ namespace cubos::core::data /// an instance of this archive. /// /// @ingroup core-data-fs - class EmbeddedArchive : public Archive + class CUBOS_CORE_API EmbeddedArchive : public Archive { public: /// @brief Describes the structure of the embedded data. diff --git a/core/include/cubos/core/data/fs/file.hpp b/core/include/cubos/core/data/fs/file.hpp index 7a4d1947db..575ccd18fd 100644 --- a/core/include/cubos/core/data/fs/file.hpp +++ b/core/include/cubos/core/data/fs/file.hpp @@ -8,6 +8,7 @@ #include #include +#include #include namespace cubos::core::data @@ -32,7 +33,7 @@ namespace cubos::core::data /// @see FileSystem /// @see Archive /// @ingroup core-data-fs - class File final : public std::enable_shared_from_this + class CUBOS_CORE_API File final : public std::enable_shared_from_this { public: /// @brief Handle to a file in the CUBOS. virtual file system. diff --git a/core/include/cubos/core/data/fs/file_system.hpp b/core/include/cubos/core/data/fs/file_system.hpp index 5940e35be3..47a81cb3dc 100644 --- a/core/include/cubos/core/data/fs/file_system.hpp +++ b/core/include/cubos/core/data/fs/file_system.hpp @@ -18,7 +18,7 @@ namespace cubos::core::data /// /// @see File /// @ingroup core-data-fs - class FileSystem final + class CUBOS_CORE_API FileSystem final { public: FileSystem() = delete; diff --git a/core/include/cubos/core/data/fs/standard_archive.hpp b/core/include/cubos/core/data/fs/standard_archive.hpp index 3140bac3df..46f020d32c 100644 --- a/core/include/cubos/core/data/fs/standard_archive.hpp +++ b/core/include/cubos/core/data/fs/standard_archive.hpp @@ -20,7 +20,7 @@ namespace cubos::core::data /// and FileSystem classes (#263). /// /// @ingroup core-data-fs - class StandardArchive : public Archive + class CUBOS_CORE_API StandardArchive : public Archive { public: ~StandardArchive() override = default; diff --git a/core/include/cubos/core/data/ser/debug.hpp b/core/include/cubos/core/data/ser/debug.hpp index 42f99f580a..8a73683c46 100644 --- a/core/include/cubos/core/data/ser/debug.hpp +++ b/core/include/cubos/core/data/ser/debug.hpp @@ -12,7 +12,7 @@ namespace cubos::core::data /// @brief Serializer implementation which prints the given data to a stream in a human-readable /// format not meant to be parsed. /// @ingroup core-data-ser - class DebugSerializer : public Serializer + class CUBOS_CORE_API DebugSerializer : public Serializer { public: /// @brief Constructs. diff --git a/core/include/cubos/core/data/ser/json.hpp b/core/include/cubos/core/data/ser/json.hpp index 6780d68dfd..2bf5e45568 100644 --- a/core/include/cubos/core/data/ser/json.hpp +++ b/core/include/cubos/core/data/ser/json.hpp @@ -11,7 +11,7 @@ namespace cubos::core::data { /// @brief Implementation of the abstract Serializer class for serializing to JSON. - class JSONSerializer : public Serializer + class CUBOS_CORE_API JSONSerializer : public Serializer { public: /// @brief Constructs. diff --git a/core/include/cubos/core/data/ser/serializer.hpp b/core/include/cubos/core/data/ser/serializer.hpp index a6a82bed58..e56e28ad18 100644 --- a/core/include/cubos/core/data/ser/serializer.hpp +++ b/core/include/cubos/core/data/ser/serializer.hpp @@ -6,6 +6,7 @@ #include +#include #include #include @@ -23,7 +24,7 @@ namespace cubos::core::data /// at least the primitive types. /// /// @ingroup core-data-ser - class Serializer + class CUBOS_CORE_API Serializer { public: virtual ~Serializer() = default; diff --git a/core/include/cubos/core/ecs/blueprint.hpp b/core/include/cubos/core/ecs/blueprint.hpp index abcc49a280..3308a8413a 100644 --- a/core/include/cubos/core/ecs/blueprint.hpp +++ b/core/include/cubos/core/ecs/blueprint.hpp @@ -20,8 +20,8 @@ namespace cubos::core::ecs /// @param map Map of old entities to new entities. /// @param type Value type. /// @param value Value. - void convertEntities(const std::unordered_map& map, const reflection::Type& type, - void* value); + CUBOS_CORE_API void convertEntities(const std::unordered_map& map, + const reflection::Type& type, void* value); /// @brief Collection of entities and their respective components and relations. /// @@ -35,7 +35,7 @@ namespace cubos::core::ecs /// not be replaced and thus continue referencing the original entity in the blueprint. /// /// @ingroup core-ecs - class Blueprint final + class CUBOS_CORE_API Blueprint final { public: /// @brief Function used by @ref instantiate to create entities. diff --git a/core/include/cubos/core/ecs/command_buffer.hpp b/core/include/cubos/core/ecs/command_buffer.hpp index 5e4d5fafbc..fb4de79d39 100644 --- a/core/include/cubos/core/ecs/command_buffer.hpp +++ b/core/include/cubos/core/ecs/command_buffer.hpp @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -23,7 +24,7 @@ namespace cubos::core::ecs /// @brief Stores commands to execute them later. /// @ingroup core-ecs - class CommandBuffer final + class CUBOS_CORE_API CommandBuffer final { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/cubos.hpp b/core/include/cubos/core/ecs/cubos.hpp index 7bd2139b06..f226ae03dc 100644 --- a/core/include/cubos/core/ecs/cubos.hpp +++ b/core/include/cubos/core/ecs/cubos.hpp @@ -47,7 +47,7 @@ namespace cubos::core::ecs /// @brief Used to chain configurations related to tags. /// @ingroup core-ecs - class TagBuilder + class CUBOS_CORE_API TagBuilder { public: /// @brief Construct. @@ -95,7 +95,7 @@ namespace cubos::core::ecs /// @brief Represents the engine itself, and exposes the interface with which the game /// developer interacts with. Ties up all the different parts of the engine together. /// @ingroup core-ecs - class Cubos final + class CUBOS_CORE_API Cubos final { public: /// @brief Used to create new systems. @@ -201,7 +201,7 @@ namespace cubos::core::ecs std::vector mStartupTags; }; - class Cubos::SystemBuilder + class CUBOS_CORE_API Cubos::SystemBuilder { public: /// @brief Constructs. @@ -331,7 +331,7 @@ namespace cubos::core::ecs int mDefaultTarget{0}; }; - class Cubos::ObserverBuilder + class CUBOS_CORE_API Cubos::ObserverBuilder { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/entity/archetype_graph.hpp b/core/include/cubos/core/ecs/entity/archetype_graph.hpp index 4f667e80a3..be76842b64 100644 --- a/core/include/cubos/core/ecs/entity/archetype_graph.hpp +++ b/core/include/cubos/core/ecs/entity/archetype_graph.hpp @@ -25,7 +25,7 @@ namespace cubos::core::ecs /// archetype's id. /// /// @ingroup core-ecs-entity - class ArchetypeGraph + class CUBOS_CORE_API ArchetypeGraph { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/entity/archetype_id.hpp b/core/include/cubos/core/ecs/entity/archetype_id.hpp index d0a016a987..0f29678b58 100644 --- a/core/include/cubos/core/ecs/entity/archetype_id.hpp +++ b/core/include/cubos/core/ecs/entity/archetype_id.hpp @@ -6,6 +6,8 @@ #include +#include + namespace cubos::core::ecs { /// @brief Identifies an archetype. @@ -24,7 +26,7 @@ namespace cubos::core::ecs }; /// @brief Hash functor for @ref ArchetypeId. - struct ArchetypeIdHash + struct CUBOS_CORE_API ArchetypeIdHash { std::size_t operator()(const ArchetypeId& id) const; }; diff --git a/core/include/cubos/core/ecs/entity/entity.hpp b/core/include/cubos/core/ecs/entity/entity.hpp index 8f3de15d97..03781a355e 100644 --- a/core/include/cubos/core/ecs/entity/entity.hpp +++ b/core/include/cubos/core/ecs/entity/entity.hpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace cubos::core::ecs @@ -19,7 +20,7 @@ namespace cubos::core::ecs /// (de)serialized as objects with two fields: their index and their generation. /// /// @ingroup core-ecs-entity - struct Entity + struct CUBOS_CORE_API Entity { CUBOS_REFLECT; diff --git a/core/include/cubos/core/ecs/entity/hash.hpp b/core/include/cubos/core/ecs/entity/hash.hpp index 2da9641d8d..77e1ec743e 100644 --- a/core/include/cubos/core/ecs/entity/hash.hpp +++ b/core/include/cubos/core/ecs/entity/hash.hpp @@ -6,6 +6,8 @@ #include +#include + namespace cubos::core::ecs { struct Entity; @@ -15,7 +17,7 @@ namespace cubos::core::ecs /// Can be used to allow @ref Entity objects to be used as keys in an `std::unordered_map`. /// /// @ingroup core-ecs-entity - struct EntityHash + struct CUBOS_CORE_API EntityHash { std::size_t operator()(const Entity& entity) const noexcept; }; diff --git a/core/include/cubos/core/ecs/entity/pool.hpp b/core/include/cubos/core/ecs/entity/pool.hpp index 9de27e0e11..6413360973 100644 --- a/core/include/cubos/core/ecs/entity/pool.hpp +++ b/core/include/cubos/core/ecs/entity/pool.hpp @@ -16,7 +16,7 @@ namespace cubos::core::ecs /// @brief Manages the creation and destruction of entity identifiers, as well as storing their /// archetype identifiers. /// @ingroup core-ecs-entity - class EntityPool final + class CUBOS_CORE_API EntityPool final { public: /// @brief Creates a new entity on the given archetype. diff --git a/core/include/cubos/core/ecs/name.hpp b/core/include/cubos/core/ecs/name.hpp index f8d4cc4da1..9afb1071e1 100644 --- a/core/include/cubos/core/ecs/name.hpp +++ b/core/include/cubos/core/ecs/name.hpp @@ -6,12 +6,13 @@ #include +#include #include namespace cubos::core::ecs { /// @brief Component which stores the name of an entity. - struct Name + struct CUBOS_CORE_API Name { CUBOS_REFLECT; diff --git a/core/include/cubos/core/ecs/observer/observers.hpp b/core/include/cubos/core/ecs/observer/observers.hpp index 2745224fbf..2ff996a288 100644 --- a/core/include/cubos/core/ecs/observer/observers.hpp +++ b/core/include/cubos/core/ecs/observer/observers.hpp @@ -16,7 +16,7 @@ namespace cubos::core::ecs { /// @brief Stores and manages all of the observers associated with a world. /// @ingroup core-ecs-observer - class Observers + class CUBOS_CORE_API Observers { public: ~Observers(); diff --git a/core/include/cubos/core/ecs/query/filter.hpp b/core/include/cubos/core/ecs/query/filter.hpp index fa62a4246b..84ad91b07e 100644 --- a/core/include/cubos/core/ecs/query/filter.hpp +++ b/core/include/cubos/core/ecs/query/filter.hpp @@ -16,7 +16,7 @@ namespace cubos::core::ecs /// @brief Used to find matches for the given query terms. Essentially contains the non-templated part of the query /// logic. /// @ingroup core-ecs-query - class QueryFilter + class CUBOS_CORE_API QueryFilter { public: /// @brief Can be iterated to view the query matches. @@ -66,7 +66,7 @@ namespace cubos::core::ecs QueryNode::TargetMask mNodePins[QueryNode::MaxCursorCount]; }; - class QueryFilter::View + class CUBOS_CORE_API QueryFilter::View { public: /// @brief Used to iterate over the query matches. @@ -118,7 +118,7 @@ namespace cubos::core::ecs bool mDead{false}; }; - class QueryFilter::View::Iterator + class CUBOS_CORE_API QueryFilter::View::Iterator { public: /// @brief Output structure of the iterator. diff --git a/core/include/cubos/core/ecs/query/node/archetype.hpp b/core/include/cubos/core/ecs/query/node/archetype.hpp index 5d50a7eb42..0329bb760f 100644 --- a/core/include/cubos/core/ecs/query/node/archetype.hpp +++ b/core/include/cubos/core/ecs/query/node/archetype.hpp @@ -12,7 +12,7 @@ namespace cubos::core::ecs { /// @brief Node which forces a given target to belong to a set of archetypes. - class QueryArchetypeNode final : public QueryNode + class CUBOS_CORE_API QueryArchetypeNode final : public QueryNode { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/query/node/node.hpp b/core/include/cubos/core/ecs/query/node/node.hpp index b549b9dc0a..632096b2cb 100644 --- a/core/include/cubos/core/ecs/query/node/node.hpp +++ b/core/include/cubos/core/ecs/query/node/node.hpp @@ -13,7 +13,7 @@ namespace cubos::core::ecs class World; /// @brief Query filter step, which receives an iterator and advances it until it points to a valid match. - class QueryNode + class CUBOS_CORE_API QueryNode { public: /// @brief Target mask type. diff --git a/core/include/cubos/core/ecs/query/node/related.hpp b/core/include/cubos/core/ecs/query/node/related.hpp index 384ab8b1a3..bd11639220 100644 --- a/core/include/cubos/core/ecs/query/node/related.hpp +++ b/core/include/cubos/core/ecs/query/node/related.hpp @@ -13,7 +13,7 @@ namespace cubos::core::ecs { /// @brief Node which forces two given targets to be related with a given relation. - class QueryRelatedNode final : public QueryNode + class CUBOS_CORE_API QueryRelatedNode final : public QueryNode { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/query/term.hpp b/core/include/cubos/core/ecs/query/term.hpp index 9edc5d0b47..83c7d34c5e 100644 --- a/core/include/cubos/core/ecs/query/term.hpp +++ b/core/include/cubos/core/ecs/query/term.hpp @@ -27,7 +27,7 @@ namespace cubos::core::ecs /// - Entity terms, which don't filter the results but allow accessing one of the matched entities. /// /// @ingroup core-ecs-query - struct QueryTerm + struct CUBOS_CORE_API QueryTerm { /// @brief Stores entity term data. struct Entity diff --git a/core/include/cubos/core/ecs/resource/manager.hpp b/core/include/cubos/core/ecs/resource/manager.hpp index 2c3d8f3b33..4ac40bf4dc 100644 --- a/core/include/cubos/core/ecs/resource/manager.hpp +++ b/core/include/cubos/core/ecs/resource/manager.hpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -75,7 +76,7 @@ namespace cubos::core::ecs /// Used internally by @ref World. /// /// @ingroup core-ecs-resource - class ResourceManager final + class CUBOS_CORE_API ResourceManager final { public: ResourceManager() = default; diff --git a/core/include/cubos/core/ecs/system/access.hpp b/core/include/cubos/core/ecs/system/access.hpp index 87a998db44..819444b2bc 100644 --- a/core/include/cubos/core/ecs/system/access.hpp +++ b/core/include/cubos/core/ecs/system/access.hpp @@ -15,7 +15,7 @@ namespace cubos::core::ecs /// Used to determine if systems conflict with each other. /// /// @ingroup core-ecs-system - struct SystemAccess + struct CUBOS_CORE_API SystemAccess { /// @brief Whether the system accesses the world directly. bool usesWorld{false}; diff --git a/core/include/cubos/core/ecs/system/arguments/commands.hpp b/core/include/cubos/core/ecs/system/arguments/commands.hpp index 2fe5210456..3c50398701 100644 --- a/core/include/cubos/core/ecs/system/arguments/commands.hpp +++ b/core/include/cubos/core/ecs/system/arguments/commands.hpp @@ -20,7 +20,7 @@ namespace cubos::core::ecs /// Internally wraps a reference to a CommandBuffer object. /// /// @ingroup core-ecs-system-arguments - class Commands final + class CUBOS_CORE_API Commands final { public: /// @brief Allows editing an entity created by a @ref Commands object. @@ -132,7 +132,7 @@ namespace cubos::core::ecs CommandBuffer& mBuffer; ///< Command buffer to write to. }; - class Commands::EntityBuilder final + class CUBOS_CORE_API Commands::EntityBuilder final { public: /// @brief Constructs. @@ -165,7 +165,7 @@ namespace cubos::core::ecs Entity mEntity; }; - class Commands::BlueprintBuilder final + class CUBOS_CORE_API Commands::BlueprintBuilder final { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/system/dispatcher.hpp b/core/include/cubos/core/ecs/system/dispatcher.hpp index 81f96ae752..50df8b9c2c 100644 --- a/core/include/cubos/core/ecs/system/dispatcher.hpp +++ b/core/include/cubos/core/ecs/system/dispatcher.hpp @@ -52,7 +52,7 @@ namespace cubos::core::ecs { /// @brief Used to add systems and relations between them and then dispatch them all at once. /// @ingroup core-ecs-system - class Dispatcher + class CUBOS_CORE_API Dispatcher { public: ~Dispatcher(); diff --git a/core/include/cubos/core/ecs/table/column.hpp b/core/include/cubos/core/ecs/table/column.hpp index 3f92cd3fad..a4668e1923 100644 --- a/core/include/cubos/core/ecs/table/column.hpp +++ b/core/include/cubos/core/ecs/table/column.hpp @@ -14,7 +14,7 @@ namespace cubos::core::ecs { /// @brief Identifies a data column type. /// @ingroup core-ecs-table - struct ColumnId + struct CUBOS_CORE_API ColumnId { uint64_t inner; ///< Column type identifier. @@ -47,7 +47,7 @@ namespace cubos::core::ecs /// @brief Used to hash @ref ColumnId objects. /// @ingroup core-ecs-table - struct ColumnIdHash + struct CUBOS_CORE_API ColumnIdHash { std::size_t operator()(const ColumnId& columnId) const noexcept; }; diff --git a/core/include/cubos/core/ecs/table/dense/registry.hpp b/core/include/cubos/core/ecs/table/dense/registry.hpp index 5b4e1c2fc5..eadb1b41ea 100644 --- a/core/include/cubos/core/ecs/table/dense/registry.hpp +++ b/core/include/cubos/core/ecs/table/dense/registry.hpp @@ -14,7 +14,7 @@ namespace cubos::core::ecs { /// @brief Stores the dense tables of a given world. /// @ingroup core-ecs-table - class DenseTableRegistry final + class CUBOS_CORE_API DenseTableRegistry final { public: /// @brief Constructs. diff --git a/core/include/cubos/core/ecs/table/dense/table.hpp b/core/include/cubos/core/ecs/table/dense/table.hpp index b1fe71a874..6037ad3da9 100644 --- a/core/include/cubos/core/ecs/table/dense/table.hpp +++ b/core/include/cubos/core/ecs/table/dense/table.hpp @@ -14,7 +14,7 @@ namespace cubos::core::ecs { /// @brief Stores the dense data associated to entities of a given archetype. /// @ingroup core-ecs-table - class DenseTable final + class CUBOS_CORE_API DenseTable final { public: /// @brief Constructs a table without columns. diff --git a/core/include/cubos/core/ecs/table/sparse_relation/id.hpp b/core/include/cubos/core/ecs/table/sparse_relation/id.hpp index 31fffab44e..9c3388bfcb 100644 --- a/core/include/cubos/core/ecs/table/sparse_relation/id.hpp +++ b/core/include/cubos/core/ecs/table/sparse_relation/id.hpp @@ -16,7 +16,7 @@ namespace cubos::core::ecs { /// @brief Identifies a sparse relation table. /// @ingroup core-ecs-table - struct SparseRelationTableId + struct CUBOS_CORE_API SparseRelationTableId { DataTypeId dataType{DataTypeId::Invalid}; ArchetypeId from{ArchetypeId::Invalid}; @@ -40,7 +40,7 @@ namespace cubos::core::ecs }; /// @brief Hash functor for @ref SparseRelationTableId. - struct SparseRelationTableIdHash + struct CUBOS_CORE_API SparseRelationTableIdHash { std::size_t operator()(const SparseRelationTableId& id) const; }; diff --git a/core/include/cubos/core/ecs/table/sparse_relation/registry.hpp b/core/include/cubos/core/ecs/table/sparse_relation/registry.hpp index a9e96ce36c..89c2a7ed27 100644 --- a/core/include/cubos/core/ecs/table/sparse_relation/registry.hpp +++ b/core/include/cubos/core/ecs/table/sparse_relation/registry.hpp @@ -14,11 +14,11 @@ namespace cubos::core::ecs { /// @brief Stores all of the sparse relation tables. /// @ingroup core-ecs-table - class SparseRelationTableRegistry + class CUBOS_CORE_API SparseRelationTableRegistry { public: /// @brief Stores the ids of tables of a given type. - class TypeIndex + class CUBOS_CORE_API TypeIndex { public: /// @brief Inserts a new table identifier into the index. diff --git a/core/include/cubos/core/ecs/table/sparse_relation/table.hpp b/core/include/cubos/core/ecs/table/sparse_relation/table.hpp index 902d6e43a0..5cf6957c95 100644 --- a/core/include/cubos/core/ecs/table/sparse_relation/table.hpp +++ b/core/include/cubos/core/ecs/table/sparse_relation/table.hpp @@ -33,7 +33,7 @@ namespace cubos::core::ecs /// These linked lists are essential to provide fast query times, as instead of having to /// iterate over the entire table and filter for entity, we only need to follow the linked /// list chain. - class SparseRelationTable final + class CUBOS_CORE_API SparseRelationTable final { public: /// @brief Transformations to apply while moving relations between tables. @@ -223,7 +223,7 @@ namespace cubos::core::ecs std::unordered_map mPairRows; }; - class SparseRelationTable::Iterator final + class CUBOS_CORE_API SparseRelationTable::Iterator final { public: /// @brief Output structure for the iterator. @@ -269,7 +269,7 @@ namespace cubos::core::ecs mutable Output mOutput; }; - class SparseRelationTable::View final + class CUBOS_CORE_API SparseRelationTable::View final { public: /// @brief Used to iterate over the relations in a view. @@ -294,7 +294,7 @@ namespace cubos::core::ecs bool mIsFrom; }; - class SparseRelationTable::View::Iterator final + class CUBOS_CORE_API SparseRelationTable::View::Iterator final { public: /// @brief Output structure for the iterator. diff --git a/core/include/cubos/core/ecs/table/tables.hpp b/core/include/cubos/core/ecs/table/tables.hpp index a408102759..8fb5fb6ce0 100644 --- a/core/include/cubos/core/ecs/table/tables.hpp +++ b/core/include/cubos/core/ecs/table/tables.hpp @@ -11,7 +11,7 @@ namespace cubos::core::ecs { /// @brief Stores the tables of a given world. /// @ingroup core-ecs-table - class Tables final + class CUBOS_CORE_API Tables final { public: /// @brief Gets a reference to the dense table registry. diff --git a/core/include/cubos/core/ecs/types.hpp b/core/include/cubos/core/ecs/types.hpp index 019fccb4b5..a402fdf138 100644 --- a/core/include/cubos/core/ecs/types.hpp +++ b/core/include/cubos/core/ecs/types.hpp @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -27,13 +28,13 @@ namespace cubos::core::ecs }; /// @brief Hash functor for @ref DataTypeId. - struct DataTypeIdHash + struct CUBOS_CORE_API DataTypeIdHash { std::size_t operator()(const DataTypeId& id) const; }; /// @brief Registry of all data types used in an ECS world. - class Types final + class CUBOS_CORE_API Types final { public: /// @brief Registers a component type. diff --git a/core/include/cubos/core/ecs/world.hpp b/core/include/cubos/core/ecs/world.hpp index 032c850d31..a4fdb71f72 100644 --- a/core/include/cubos/core/ecs/world.hpp +++ b/core/include/cubos/core/ecs/world.hpp @@ -26,7 +26,7 @@ namespace cubos::core::ecs /// @brief Holds entities, their components and resources. /// @see Internally, components are stored in abstract containers called @ref Storage's. /// @ingroup core-ecs - class World + class CUBOS_CORE_API World { public: ~World(); diff --git a/core/include/cubos/core/geom/aabb.hpp b/core/include/cubos/core/geom/aabb.hpp index 64bb8a77f0..2bb52379da 100644 --- a/core/include/cubos/core/geom/aabb.hpp +++ b/core/include/cubos/core/geom/aabb.hpp @@ -6,13 +6,14 @@ #include +#include #include namespace cubos::core::geom { /// @brief Represents an axis-aligned bounding box. /// @ingroup core-geom - struct AABB + struct CUBOS_CORE_API AABB { /// @brief Diagonal of the AABB. glm::vec3 diag[2] = {glm::vec3{-std::numeric_limits::infinity()}, diff --git a/core/include/cubos/core/geom/box.hpp b/core/include/cubos/core/geom/box.hpp index 855c393af4..656314ffb8 100644 --- a/core/include/cubos/core/geom/box.hpp +++ b/core/include/cubos/core/geom/box.hpp @@ -6,6 +6,7 @@ #include +#include #include #include #include @@ -14,7 +15,7 @@ namespace cubos::core::geom { /// @brief Represents a box shape. /// @ingroup core-geom - struct Box + struct CUBOS_CORE_API Box { CUBOS_REFLECT; diff --git a/core/include/cubos/core/geom/capsule.hpp b/core/include/cubos/core/geom/capsule.hpp index f31f7c05c6..1e7c5dc70c 100644 --- a/core/include/cubos/core/geom/capsule.hpp +++ b/core/include/cubos/core/geom/capsule.hpp @@ -4,6 +4,7 @@ #pragma once +#include #include #include #include @@ -13,7 +14,7 @@ namespace cubos::core::geom { /// @brief Represents a capsule or sphere shape. /// @ingroup core-geom - struct Capsule + struct CUBOS_CORE_API Capsule { CUBOS_REFLECT; diff --git a/core/include/cubos/core/geom/intersections.hpp b/core/include/cubos/core/geom/intersections.hpp index dd95b718cb..4047abedca 100644 --- a/core/include/cubos/core/geom/intersections.hpp +++ b/core/include/cubos/core/geom/intersections.hpp @@ -16,7 +16,7 @@ namespace cubos::core::geom { /// @brief Contains info regarding an intersection between shapes. /// @ingroup core-geom - struct Intersection + struct CUBOS_CORE_API Intersection { CUBOS_REFLECT; @@ -30,7 +30,7 @@ namespace cubos::core::geom /// @param localToWorld1 Local to world matrix of the first entity. /// @param box2 Box shape of the second entity. /// @param localToWorld2 Local to world matrix of the second entity. - bool intersects(const Box& box1, const glm::mat4& localToWorld1, const Box& box2, const glm::mat4& localToWorld2, - Intersection& intersect); + CUBOS_CORE_API bool intersects(const Box& box1, const glm::mat4& localToWorld1, const Box& box2, + const glm::mat4& localToWorld2, Intersection& intersect); } // namespace cubos::core::geom diff --git a/core/include/cubos/core/gl/debug.hpp b/core/include/cubos/core/gl/debug.hpp index eea17c3a9e..b09f0de665 100644 --- a/core/include/cubos/core/gl/debug.hpp +++ b/core/include/cubos/core/gl/debug.hpp @@ -18,7 +18,7 @@ namespace cubos::core::gl /// @brief Singleton with static methods used to draw primitive objects on screen for debugging /// purposes. /// @ingroup core-gl - class Debug + class CUBOS_CORE_API Debug { public: /// @brief Initializes the debug rendering system. diff --git a/core/include/cubos/core/gl/render_device.hpp b/core/include/cubos/core/gl/render_device.hpp index f94df8583b..39635b8f64 100644 --- a/core/include/cubos/core/gl/render_device.hpp +++ b/core/include/cubos/core/gl/render_device.hpp @@ -9,6 +9,8 @@ #include +#include + /// @brief Maximum number of render targets that can be set on a framebuffer. /// @todo Make this a compile-time constant instead of a macro. /// @ingroup core-gl @@ -423,7 +425,7 @@ namespace cubos::core::gl /// @brief Describes a framebuffer. /// @ingroup core-gl - struct FramebufferDesc + struct CUBOS_CORE_API FramebufferDesc { /// @brief Describes a cube map target. struct CubeMapTarget @@ -713,7 +715,7 @@ namespace cubos::core::gl /// /// @see @ref io::Window is responsible for creating a render device for itself. /// @ingroup core-gl - class RenderDevice + class CUBOS_CORE_API RenderDevice { public: virtual ~RenderDevice() = default; diff --git a/core/include/cubos/core/gl/util.hpp b/core/include/cubos/core/gl/util.hpp index 4ac491ebda..90f594460a 100644 --- a/core/include/cubos/core/gl/util.hpp +++ b/core/include/cubos/core/gl/util.hpp @@ -18,5 +18,5 @@ namespace cubos::core::gl /// @param renderDevice RenderDevice to be used for generation of the quad. /// @param pipeline Pipeline to associate the quad's VertexArray with. /// @param[out] va Handle of the quad's VertexArray. - void generateScreenQuad(RenderDevice& renderDevice, const ShaderPipeline& pipeline, VertexArray& va); + CUBOS_CORE_API void generateScreenQuad(RenderDevice& renderDevice, const ShaderPipeline& pipeline, VertexArray& va); } // namespace cubos::core::gl diff --git a/core/include/cubos/core/io/cursor.hpp b/core/include/cubos/core/io/cursor.hpp index a35d8059f1..eb12625f95 100644 --- a/core/include/cubos/core/io/cursor.hpp +++ b/core/include/cubos/core/io/cursor.hpp @@ -4,6 +4,7 @@ #pragma once +#include #include #ifdef WITH_GLFW @@ -15,7 +16,7 @@ namespace cubos::core::io { /// @brief Handle for a custom mouse cursor. /// @ingroup core-io - class Cursor + class CUBOS_CORE_API Cursor { public: /// @brief Identifiers for the different standard cursors. @@ -46,4 +47,4 @@ namespace cubos::core::io }; } // namespace cubos::core::io -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::Cursor::Standard); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::Cursor::Standard); diff --git a/core/include/cubos/core/io/gamepad.hpp b/core/include/cubos/core/io/gamepad.hpp index 1738ceff1c..39d610b378 100644 --- a/core/include/cubos/core/io/gamepad.hpp +++ b/core/include/cubos/core/io/gamepad.hpp @@ -6,6 +6,7 @@ #include +#include #include namespace cubos::core::io @@ -53,7 +54,7 @@ namespace cubos::core::io /// @brief Holds the state of a gamepad. /// @ingroup core-io - struct GamepadState + struct CUBOS_CORE_API GamepadState { /// @brief Which buttons are pressed, indexed by @ref GamepadButton. bool buttons[static_cast(GamepadButton::Count)]; @@ -82,26 +83,26 @@ namespace cubos::core::io /// @param button Button to convert. /// @return String representation. /// @ingroup core-io - std::string gamepadButtonToString(GamepadButton button); + CUBOS_CORE_API std::string gamepadButtonToString(GamepadButton button); /// @brief Converts a string to a @ref GamepadButton. /// @param str String to convert. /// @return Button. /// @ingroup core-io - GamepadButton stringToGamepadButton(const std::string& str); + CUBOS_CORE_API GamepadButton stringToGamepadButton(const std::string& str); /// @brief Convert a @ref GamepadAxis to a string. /// @param axis Axis to convert. /// @return String representation. /// @ingroup core-io - std::string gamepadAxisToString(GamepadAxis axis); + CUBOS_CORE_API std::string gamepadAxisToString(GamepadAxis axis); /// @brief Convert a string to a @ref GamepadAxis. /// @param str String to convert. /// @return Axis. /// @ingroup core-io - GamepadAxis stringToGamepadAxis(const std::string& str); + CUBOS_CORE_API GamepadAxis stringToGamepadAxis(const std::string& str); } // namespace cubos::core::io -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::GamepadButton); -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::GamepadAxis); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::GamepadButton); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::GamepadAxis); diff --git a/core/include/cubos/core/io/keyboard.hpp b/core/include/cubos/core/io/keyboard.hpp index 671ecce4ba..9013bdf738 100644 --- a/core/include/cubos/core/io/keyboard.hpp +++ b/core/include/cubos/core/io/keyboard.hpp @@ -6,6 +6,7 @@ #include +#include #include namespace cubos::core::io @@ -131,7 +132,7 @@ namespace cubos::core::io /// @brief Keyboard key code and modifier flags. /// @ingroup core-io - struct KeyWithModifiers + struct CUBOS_CORE_API KeyWithModifiers { CUBOS_REFLECT; @@ -167,5 +168,5 @@ namespace cubos::core::io } } // namespace cubos::core::io -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::Key); -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::Modifiers); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::Key); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::Modifiers); diff --git a/core/include/cubos/core/io/window.hpp b/core/include/cubos/core/io/window.hpp index 5d07c283ce..2a0e4e85af 100644 --- a/core/include/cubos/core/io/window.hpp +++ b/core/include/cubos/core/io/window.hpp @@ -138,19 +138,19 @@ namespace cubos::core::io /// @param size Window size, in screen coordinates. /// @return New window, or nullptr on failure. /// @ingroup core-io - Window openWindow(const std::string& title = "CUBOS.", const glm::ivec2& size = {800, 600}); + CUBOS_CORE_API Window openWindow(const std::string& title = "CUBOS.", const glm::ivec2& size = {800, 600}); /// @brief Converts a @ref MouseButton enum to a string. /// @param button MouseButton to convert. /// @return String representation. /// @ingroup core-io - std::string mouseButtonToString(MouseButton button); + CUBOS_CORE_API std::string mouseButtonToString(MouseButton button); /// @brief Convert a string to a @ref MouseButton enum. /// @param str The string to convert. /// @return MouseButton. /// @ingroup core-io - MouseButton stringToMouseButton(const std::string& str); + CUBOS_CORE_API MouseButton stringToMouseButton(const std::string& str); /// @brief Interface used to wrap low-level window API implementations. /// @@ -158,7 +158,7 @@ namespace cubos::core::io /// window. /// /// @ingroup core-io - class BaseWindow + class CUBOS_CORE_API BaseWindow { public: BaseWindow(); @@ -260,6 +260,6 @@ namespace cubos::core::io }; } // namespace cubos::core::io -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::MouseButton); -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::MouseAxis); -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::io::MouseState); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::MouseButton); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::MouseAxis); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::io::MouseState); diff --git a/core/include/cubos/core/log.hpp b/core/include/cubos/core/log.hpp index 72eb9d848c..591d9b7ac5 100644 --- a/core/include/cubos/core/log.hpp +++ b/core/include/cubos/core/log.hpp @@ -240,7 +240,7 @@ namespace cubos::core { /// @brief Singleton which holds the logging state. /// @ingroup core - class Logger final + class CUBOS_CORE_API Logger final { public: /// @brief Represents a logging level. @@ -365,4 +365,4 @@ namespace cubos::core }; } // namespace cubos::core -CUBOS_REFLECT_EXTERNAL_DECL(cubos::core::Logger::Level); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, cubos::core::Logger::Level); diff --git a/core/include/cubos/core/memory/any_value.hpp b/core/include/cubos/core/memory/any_value.hpp index 6863b21722..fad1a826b0 100644 --- a/core/include/cubos/core/memory/any_value.hpp +++ b/core/include/cubos/core/memory/any_value.hpp @@ -4,6 +4,8 @@ #pragma once +#include + namespace cubos::core::reflection { class Type; @@ -13,7 +15,7 @@ namespace cubos::core::memory { /// @brief Stores a blob of a given reflected type. /// @ingroup core-memory - class AnyValue final + class CUBOS_CORE_API AnyValue final { public: ~AnyValue(); diff --git a/core/include/cubos/core/memory/any_vector.hpp b/core/include/cubos/core/memory/any_vector.hpp index c690311917..2288954a5c 100644 --- a/core/include/cubos/core/memory/any_vector.hpp +++ b/core/include/cubos/core/memory/any_vector.hpp @@ -6,6 +6,8 @@ #include +#include + namespace cubos::core::reflection { class Type; @@ -16,7 +18,7 @@ namespace cubos::core::memory { /// @brief Stores a dynamically sized array of blobs of a given reflected type. /// @ingroup core-memory - class AnyVector final + class CUBOS_CORE_API AnyVector final { public: ~AnyVector(); diff --git a/core/include/cubos/core/memory/buffer_stream.hpp b/core/include/cubos/core/memory/buffer_stream.hpp index a7a6abc9cc..f0bb167b65 100644 --- a/core/include/cubos/core/memory/buffer_stream.hpp +++ b/core/include/cubos/core/memory/buffer_stream.hpp @@ -10,7 +10,7 @@ namespace cubos::core::memory { /// @brief Stream implementation which writes to/reads from a buffer. /// @ingroup core-memory - class BufferStream : public Stream + class CUBOS_CORE_API BufferStream : public Stream { public: ~BufferStream() override; diff --git a/core/include/cubos/core/memory/endianness.hpp b/core/include/cubos/core/memory/endianness.hpp index 9e068b0862..c994115d64 100644 --- a/core/include/cubos/core/memory/endianness.hpp +++ b/core/include/cubos/core/memory/endianness.hpp @@ -4,6 +4,8 @@ #pragma once +#include + namespace cubos::core::memory { /// @brief Swaps the bytes of a value, changing its endianness. @@ -17,7 +19,7 @@ namespace cubos::core::memory /// @brief Checks if the current platform is little endian. /// @return Whether its little endian. /// @ingroup core-memory - bool isLittleEndian(); + CUBOS_CORE_API bool isLittleEndian(); /// @brief Converts a value from little endianness to local endianness. /// @tparam T Value type. diff --git a/core/include/cubos/core/memory/standard_stream.hpp b/core/include/cubos/core/memory/standard_stream.hpp index 14ea511184..855719cc8e 100644 --- a/core/include/cubos/core/memory/standard_stream.hpp +++ b/core/include/cubos/core/memory/standard_stream.hpp @@ -12,7 +12,7 @@ namespace cubos::core::memory { /// @brief Stream implementation which wraps a `libc` file pointer. /// @ingroup core-memory - class StandardStream : public Stream + class CUBOS_CORE_API StandardStream : public Stream { public: ~StandardStream() override; diff --git a/core/include/cubos/core/memory/stream.hpp b/core/include/cubos/core/memory/stream.hpp index ced1162411..5c181a0352 100644 --- a/core/include/cubos/core/memory/stream.hpp +++ b/core/include/cubos/core/memory/stream.hpp @@ -8,6 +8,8 @@ #include #include +#include + namespace cubos::core::memory { /// @brief Stream seek origin. @@ -29,7 +31,7 @@ namespace cubos::core::memory /// files into the executable and not have to worry about the code that reads them. /// /// @ingroup core-memory - class Stream + class CUBOS_CORE_API Stream { public: virtual ~Stream() = default; diff --git a/core/include/cubos/core/reflection/comparison.hpp b/core/include/cubos/core/reflection/comparison.hpp index 58ff65afe0..f971e921c5 100644 --- a/core/include/cubos/core/reflection/comparison.hpp +++ b/core/include/cubos/core/reflection/comparison.hpp @@ -1,15 +1,18 @@ /// @file /// @brief Function @ref cubos::core::reflection::compare. /// @ingroup core-reflection -#include + +#include namespace cubos::core::reflection { + class Type; + /// @brief Compares two instances of the same type. /// @param type The type of the data being compared /// @param a One of the instances. /// @param b The other instance. /// @note If the type has no comparable trait, this function will abort. /// @return True if the values are equal, false otherwise. - bool compare(const Type& type, void* a, void* b); + CUBOS_CORE_API bool compare(const Type& type, void* a, void* b); } // namespace cubos::core::reflection diff --git a/core/include/cubos/core/reflection/external/cstring.hpp b/core/include/cubos/core/reflection/external/cstring.hpp index d9c3629761..e76b5ee8a2 100644 --- a/core/include/cubos/core/reflection/external/cstring.hpp +++ b/core/include/cubos/core/reflection/external/cstring.hpp @@ -4,7 +4,8 @@ #pragma once +#include #include -CUBOS_REFLECT_EXTERNAL_DECL(const char*); -CUBOS_REFLECT_EXTERNAL_DECL(char*); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, const char*); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, char*); diff --git a/core/include/cubos/core/reflection/external/glm.hpp b/core/include/cubos/core/reflection/external/glm.hpp index e1711eabee..4c1cc621de 100644 --- a/core/include/cubos/core/reflection/external/glm.hpp +++ b/core/include/cubos/core/reflection/external/glm.hpp @@ -6,42 +6,43 @@ #include +#include #include -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat2x3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat2x3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat2x4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat2x4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat3x2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat3x2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat3x4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat3x4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat4x2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat4x2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat4x3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat4x3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::mat4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dmat4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat2x3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat2x3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat2x4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat2x4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat3x2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat3x2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat3x4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat3x4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat4x2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat4x2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat4x3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat4x3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::mat4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dmat4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::vec2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::bvec2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dvec2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::ivec2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::uvec2); -CUBOS_REFLECT_EXTERNAL_DECL(glm::vec3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::bvec3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dvec3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::ivec3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::uvec3); -CUBOS_REFLECT_EXTERNAL_DECL(glm::vec4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dvec4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::bvec4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::ivec4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::uvec4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::vec2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::bvec2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dvec2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::ivec2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::uvec2); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::vec3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::bvec3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dvec3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::ivec3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::uvec3); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::vec4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dvec4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::bvec4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::ivec4); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::uvec4); -CUBOS_REFLECT_EXTERNAL_DECL(glm::quat); -CUBOS_REFLECT_EXTERNAL_DECL(glm::dquat); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::quat); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, glm::dquat); diff --git a/core/include/cubos/core/reflection/external/primitives.hpp b/core/include/cubos/core/reflection/external/primitives.hpp index fa526dae25..ec11311dfa 100644 --- a/core/include/cubos/core/reflection/external/primitives.hpp +++ b/core/include/cubos/core/reflection/external/primitives.hpp @@ -4,28 +4,29 @@ #pragma once +#include #include // Boolean type. -CUBOS_REFLECT_EXTERNAL_DECL(bool); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, bool); // Char type (distinct from `signed char` and `unsigned char`). -CUBOS_REFLECT_EXTERNAL_DECL(char); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, char); // Signed integer types. -CUBOS_REFLECT_EXTERNAL_DECL(signed char); -CUBOS_REFLECT_EXTERNAL_DECL(short); -CUBOS_REFLECT_EXTERNAL_DECL(int); -CUBOS_REFLECT_EXTERNAL_DECL(long); -CUBOS_REFLECT_EXTERNAL_DECL(long long); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, signed char); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, short); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, int); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, long); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, long long); // Unsigned integer types. -CUBOS_REFLECT_EXTERNAL_DECL(unsigned char); -CUBOS_REFLECT_EXTERNAL_DECL(unsigned short); -CUBOS_REFLECT_EXTERNAL_DECL(unsigned int); -CUBOS_REFLECT_EXTERNAL_DECL(unsigned long); -CUBOS_REFLECT_EXTERNAL_DECL(unsigned long long); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, unsigned char); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, unsigned short); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, unsigned int); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, unsigned long); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, unsigned long long); // Floating point types. -CUBOS_REFLECT_EXTERNAL_DECL(float); -CUBOS_REFLECT_EXTERNAL_DECL(double); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, float); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, double); diff --git a/core/include/cubos/core/reflection/external/string.hpp b/core/include/cubos/core/reflection/external/string.hpp index 71b5d88261..9444065b25 100644 --- a/core/include/cubos/core/reflection/external/string.hpp +++ b/core/include/cubos/core/reflection/external/string.hpp @@ -6,6 +6,7 @@ #include +#include #include -CUBOS_REFLECT_EXTERNAL_DECL(std::string); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, std::string); diff --git a/core/include/cubos/core/reflection/external/string_view.hpp b/core/include/cubos/core/reflection/external/string_view.hpp index faadd3ee43..f9a95ff380 100644 --- a/core/include/cubos/core/reflection/external/string_view.hpp +++ b/core/include/cubos/core/reflection/external/string_view.hpp @@ -6,6 +6,7 @@ #include +#include #include -CUBOS_REFLECT_EXTERNAL_DECL(std::string_view); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, std::string_view); diff --git a/core/include/cubos/core/reflection/external/uuid.hpp b/core/include/cubos/core/reflection/external/uuid.hpp index 9d85d2d0d1..14ba9dd8fe 100644 --- a/core/include/cubos/core/reflection/external/uuid.hpp +++ b/core/include/cubos/core/reflection/external/uuid.hpp @@ -6,6 +6,7 @@ #include +#include #include -CUBOS_REFLECT_EXTERNAL_DECL(uuids::uuid); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, uuids::uuid); diff --git a/core/include/cubos/core/reflection/reflect.hpp b/core/include/cubos/core/reflection/reflect.hpp index d2b03219c7..8d4073785c 100644 --- a/core/include/cubos/core/reflection/reflect.hpp +++ b/core/include/cubos/core/reflection/reflect.hpp @@ -98,6 +98,9 @@ namespace cubos::core::reflection /// @ingroup core-reflection #define CUBOS_PACK(...) __VA_ARGS__ +/// @brief Helper macro with no effect. +#define CUBOS_EMPTY + /// @brief Declares a reflection method. /// /// @code{.cpp} @@ -143,10 +146,11 @@ namespace cubos::core::reflection /// @endcode /// /// @see Meant to be used with @ref CUBOS_REFLECT_EXTERNAL_IMPL. +/// @param api API macro to use. Set to @ref CUBOS_EMPTY if not using an API macro. /// @param T Type to reflect. /// @ingroup core-reflection -#define CUBOS_REFLECT_EXTERNAL_DECL_TEMPLATE(T) \ - struct cubos::core::reflection::Reflect \ +#define CUBOS_REFLECT_EXTERNAL_DECL_TEMPLATE(api, T) \ + struct api cubos::core::reflection::Reflect \ { \ static const cubos::core::reflection::Type& type(); \ } @@ -157,15 +161,16 @@ namespace cubos::core::reflection /// // not_my_type_reflection.hpp /// #include /// -/// CUBOS_REFLECT_EXTERNAL_DECL(NotMyType); +/// CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_CORE_API, NotMyType); /// @endcode /// /// @see Meant to be used with @ref CUBOS_REFLECT_EXTERNAL_IMPL. +/// @param api API macro to use. Set to @ref CUBOS_EMPTY if not using an API macro. /// @param T Type to reflect. /// @ingroup core-reflection -#define CUBOS_REFLECT_EXTERNAL_DECL(T) \ +#define CUBOS_REFLECT_EXTERNAL_DECL(api, T) \ template <> \ - CUBOS_REFLECT_EXTERNAL_DECL_TEMPLATE(T) + CUBOS_REFLECT_EXTERNAL_DECL_TEMPLATE(api, T) /// @brief Implements a specialization of @ref cubos::core::reflection::Reflect for a type. /// @@ -211,6 +216,6 @@ namespace cubos::core::reflection /// @ingroup core-reflection #define CUBOS_REFLECT_EXTERNAL_TEMPLATE(args, T) \ template \ - CUBOS_REFLECT_EXTERNAL_DECL_TEMPLATE(CUBOS_PACK T); \ + CUBOS_REFLECT_EXTERNAL_DECL_TEMPLATE(CUBOS_EMPTY, CUBOS_PACK T); \ template \ CUBOS_REFLECT_EXTERNAL_IMPL(CUBOS_PACK T) diff --git a/core/include/cubos/core/reflection/traits/array.hpp b/core/include/cubos/core/reflection/traits/array.hpp index 85f4847e41..e5ac5e8e63 100644 --- a/core/include/cubos/core/reflection/traits/array.hpp +++ b/core/include/cubos/core/reflection/traits/array.hpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace cubos::core::reflection @@ -14,7 +15,7 @@ namespace cubos::core::reflection /// @brief Exposes array-like functionality of a type. /// @see See @ref examples-core-reflection-traits-array for an example of using this trait. /// @ingroup core-reflection - class ArrayTrait final + class CUBOS_CORE_API ArrayTrait final { public: /// @brief Provides mutable access to an array. @@ -107,7 +108,7 @@ namespace cubos::core::reflection Erase mErase{nullptr}; }; - class ArrayTrait::View final + class CUBOS_CORE_API ArrayTrait::View final { public: /// @brief Used to iterate over the elements of an array. @@ -172,7 +173,7 @@ namespace cubos::core::reflection void* mInstance; }; - class ArrayTrait::ConstView final + class CUBOS_CORE_API ArrayTrait::ConstView final { public: /// @brief Used to iterate over the elements of an array. @@ -205,7 +206,7 @@ namespace cubos::core::reflection const void* mInstance; }; - class ArrayTrait::View::Iterator final + class CUBOS_CORE_API ArrayTrait::View::Iterator final { public: /// @brief Constructs. @@ -241,7 +242,7 @@ namespace cubos::core::reflection std::size_t mIndex; }; - class ArrayTrait::ConstView::Iterator final + class CUBOS_CORE_API ArrayTrait::ConstView::Iterator final { public: /// @brief Constructs. diff --git a/core/include/cubos/core/reflection/traits/constructible.hpp b/core/include/cubos/core/reflection/traits/constructible.hpp index 602365a402..3f3726b99f 100644 --- a/core/include/cubos/core/reflection/traits/constructible.hpp +++ b/core/include/cubos/core/reflection/traits/constructible.hpp @@ -6,6 +6,7 @@ #include +#include #include namespace cubos::core::reflection @@ -14,7 +15,7 @@ namespace cubos::core::reflection /// @see See @ref examples-core-reflection-traits-constructible for an example of using this /// trait. /// @ingroup core-reflection - class ConstructibleTrait + class CUBOS_CORE_API ConstructibleTrait { public: /// @brief Function pointer to the destructor of a type. diff --git a/core/include/cubos/core/reflection/traits/dictionary.hpp b/core/include/cubos/core/reflection/traits/dictionary.hpp index a810e8b02a..d9de61d47d 100644 --- a/core/include/cubos/core/reflection/traits/dictionary.hpp +++ b/core/include/cubos/core/reflection/traits/dictionary.hpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace cubos::core::reflection @@ -14,7 +15,7 @@ namespace cubos::core::reflection /// @brief Exposes dictionary-like functionality of a type. /// @see See @ref examples-core-reflection-traits-dictionary for an example of using this trait. /// @ingroup core-reflection - class DictionaryTrait final + class CUBOS_CORE_API DictionaryTrait final { public: /// @brief Provides mutable access to a dictionary. @@ -143,7 +144,7 @@ namespace cubos::core::reflection Erase mErase{nullptr}; }; - class DictionaryTrait::View + class CUBOS_CORE_API DictionaryTrait::View { public: /// @brief Used to iterate over the entries of a dictionary. @@ -206,7 +207,7 @@ namespace cubos::core::reflection void* mInstance; }; - class DictionaryTrait::ConstView + class CUBOS_CORE_API DictionaryTrait::ConstView { public: /// @brief Used to iterate over the entries of a dictionary. @@ -240,7 +241,7 @@ namespace cubos::core::reflection const void* mInstance; }; - class DictionaryTrait::View::Iterator + class CUBOS_CORE_API DictionaryTrait::View::Iterator { public: /// @brief Output structure for the iterator. @@ -303,7 +304,7 @@ namespace cubos::core::reflection mutable Entry mEntry; }; - class DictionaryTrait::ConstView::Iterator + class CUBOS_CORE_API DictionaryTrait::ConstView::Iterator { public: /// @brief Output structure for the iterator. diff --git a/core/include/cubos/core/reflection/traits/enum.hpp b/core/include/cubos/core/reflection/traits/enum.hpp index 368893e85e..6bc5d19809 100644 --- a/core/include/cubos/core/reflection/traits/enum.hpp +++ b/core/include/cubos/core/reflection/traits/enum.hpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -15,7 +16,7 @@ namespace cubos::core::reflection /// @brief Provides enumeration functionality to an enumerated type. /// @see See @ref examples-core-reflection-traits-enum for an example of using this trait. /// @ingroup core-reflection - class EnumTrait + class CUBOS_CORE_API EnumTrait { public: /// @brief Represents an individual variant within the enumerated type. @@ -123,7 +124,7 @@ namespace cubos::core::reflection Variant* mLastVariant{nullptr}; }; - class EnumTrait::Variant + class CUBOS_CORE_API EnumTrait::Variant { public: /// @brief Constructs a variant with a given name, tester function, and setter function. @@ -159,7 +160,7 @@ namespace cubos::core::reflection Setter mSetter; }; - class EnumTrait::Iterator final + class CUBOS_CORE_API EnumTrait::Iterator final { public: /// @brief Constructs. diff --git a/core/include/cubos/core/reflection/traits/fields.hpp b/core/include/cubos/core/reflection/traits/fields.hpp index 6e906c944d..8b2ac37d9b 100644 --- a/core/include/cubos/core/reflection/traits/fields.hpp +++ b/core/include/cubos/core/reflection/traits/fields.hpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace cubos::core::reflection @@ -14,7 +15,7 @@ namespace cubos::core::reflection /// @brief Describes the fields of a reflected type. /// @see See @ref examples-core-reflection-traits-fields for an example of using this trait. /// @ingroup core-reflection - class FieldsTrait + class CUBOS_CORE_API FieldsTrait { public: /// @brief Interface for obtaining the address of a field on a given instance. @@ -111,7 +112,7 @@ namespace cubos::core::reflection Field* mLastField{nullptr}; }; - class FieldsTrait::AddressOf + class CUBOS_CORE_API FieldsTrait::AddressOf { public: virtual ~AddressOf() = default; @@ -142,7 +143,7 @@ namespace cubos::core::reflection F O::*mPointer; }; - class FieldsTrait::Field final + class CUBOS_CORE_API FieldsTrait::Field final { public: ~Field(); @@ -190,7 +191,7 @@ namespace cubos::core::reflection Field* mNext{nullptr}; }; - class FieldsTrait::Iterator final + class CUBOS_CORE_API FieldsTrait::Iterator final { public: /// @brief Constructs. @@ -224,7 +225,7 @@ namespace cubos::core::reflection const Field* mField; }; - class FieldsTrait::View + class CUBOS_CORE_API FieldsTrait::View { public: /// @brief Used to iterate over the fields of an object. @@ -259,7 +260,7 @@ namespace cubos::core::reflection void* mInstance; }; - class FieldsTrait::ConstView + class CUBOS_CORE_API FieldsTrait::ConstView { public: /// @brief Used to iterate over the fields of an object. @@ -294,7 +295,7 @@ namespace cubos::core::reflection const void* mInstance; }; - class FieldsTrait::View::Iterator + class CUBOS_CORE_API FieldsTrait::View::Iterator { public: /// @brief Output structure for the iterator. @@ -344,7 +345,7 @@ namespace cubos::core::reflection mutable Output mOutput; }; - class FieldsTrait::ConstView::Iterator + class CUBOS_CORE_API FieldsTrait::ConstView::Iterator { public: /// @brief Output structure for the iterator. diff --git a/core/include/cubos/core/reflection/traits/mask.hpp b/core/include/cubos/core/reflection/traits/mask.hpp index c721fc17cd..9490c0dda1 100644 --- a/core/include/cubos/core/reflection/traits/mask.hpp +++ b/core/include/cubos/core/reflection/traits/mask.hpp @@ -6,6 +6,7 @@ #include +#include #include namespace cubos::core::reflection @@ -13,7 +14,7 @@ namespace cubos::core::reflection /// @brief Provides mask functionality to an enum mask type. /// @see See @ref examples-core-reflection-traits-mask for an example of using this trait. /// @ingroup core-reflection - class MaskTrait + class CUBOS_CORE_API MaskTrait { public: /// @brief Represents a bit within the mask type. @@ -116,7 +117,7 @@ namespace cubos::core::reflection Bit* mLastBit{nullptr}; }; - class MaskTrait::Bit + class CUBOS_CORE_API MaskTrait::Bit { public: /// @brief Constructs. @@ -158,7 +159,7 @@ namespace cubos::core::reflection Clearer mClearer; }; - class MaskTrait::Iterator final + class CUBOS_CORE_API MaskTrait::Iterator final { public: /// @brief Constructs. @@ -198,7 +199,7 @@ namespace cubos::core::reflection const Bit* mBit; }; - class MaskTrait::SetIterator + class CUBOS_CORE_API MaskTrait::SetIterator { public: /// @brief Constructs. @@ -235,7 +236,7 @@ namespace cubos::core::reflection const void* mInstance; }; - class MaskTrait::View + class CUBOS_CORE_API MaskTrait::View { public: /// @brief Constructs. @@ -291,7 +292,7 @@ namespace cubos::core::reflection void* mInstance; }; - class MaskTrait::ConstView + class CUBOS_CORE_API MaskTrait::ConstView { public: /// @brief Constructs. diff --git a/core/include/cubos/core/reflection/traits/nullable.hpp b/core/include/cubos/core/reflection/traits/nullable.hpp index 6cc9457865..57ff44d7e3 100644 --- a/core/include/cubos/core/reflection/traits/nullable.hpp +++ b/core/include/cubos/core/reflection/traits/nullable.hpp @@ -4,6 +4,7 @@ #pragma once +#include #include namespace cubos::core::reflection @@ -11,7 +12,7 @@ namespace cubos::core::reflection /// @brief Used to manipulate values of null-representable types. /// @see See @ref examples-core-reflection-traits-nullable for an example of using this trait. /// @ingroup core-reflection - class NullableTrait + class CUBOS_CORE_API NullableTrait { public: /// @brief Function pointer to check if a value represents null. diff --git a/core/include/cubos/core/reflection/traits/string_conversion.hpp b/core/include/cubos/core/reflection/traits/string_conversion.hpp index 8a972a668d..89ec370bfa 100644 --- a/core/include/cubos/core/reflection/traits/string_conversion.hpp +++ b/core/include/cubos/core/reflection/traits/string_conversion.hpp @@ -6,6 +6,7 @@ #include +#include #include namespace cubos::core::reflection @@ -13,7 +14,7 @@ namespace cubos::core::reflection /// @brief Stores functions for converting a type to and from a string. /// @see See @ref examples-core-reflection-traits-string-conversion for an example of using this trait. /// @ingroup core-reflection - class StringConversionTrait + class CUBOS_CORE_API StringConversionTrait { public: /// @brief Function pointer to convert an instance of the type into a string. diff --git a/core/include/cubos/core/reflection/type.hpp b/core/include/cubos/core/reflection/type.hpp index da82150c24..05f436fccb 100644 --- a/core/include/cubos/core/reflection/type.hpp +++ b/core/include/cubos/core/reflection/type.hpp @@ -8,6 +8,7 @@ #include #include +#include #include namespace cubos::core::reflection @@ -19,7 +20,7 @@ namespace cubos::core::reflection /// /// @see This class holds the data returned by the @ref reflect() function. /// @ingroup core-reflection - class Type final + class CUBOS_CORE_API Type final { public: Type(const Type&) = delete; diff --git a/core/include/cubos/core/reflection/type_registry.hpp b/core/include/cubos/core/reflection/type_registry.hpp index e1674148cb..fc377eddd8 100644 --- a/core/include/cubos/core/reflection/type_registry.hpp +++ b/core/include/cubos/core/reflection/type_registry.hpp @@ -6,6 +6,7 @@ #include +#include #include #include @@ -13,7 +14,7 @@ namespace cubos::core::reflection { /// @brief Stores a set of types which can be accessed by name. /// @ingroup core-reflection - class TypeRegistry final + class CUBOS_CORE_API TypeRegistry final { public: using Iterator = typename memory::UnorderedBimap::Iterator; diff --git a/core/include/cubos/core/thread_pool.hpp b/core/include/cubos/core/thread_pool.hpp index 368474a497..e2f50e2f9a 100644 --- a/core/include/cubos/core/thread_pool.hpp +++ b/core/include/cubos/core/thread_pool.hpp @@ -11,12 +11,14 @@ #include #include +#include + namespace cubos::core { /// @brief Manages a pool of threads, to which tasks can be submitted. /// @note Blocks on tasks to finish on destruction. /// @ingroup core - class ThreadPool final + class CUBOS_CORE_API ThreadPool final { public: ~ThreadPool(); diff --git a/core/tests/data/des/json.cpp b/core/tests/data/des/json.cpp index 3228c11d86..ea014058d9 100644 --- a/core/tests/data/des/json.cpp +++ b/core/tests/data/des/json.cpp @@ -70,7 +70,7 @@ namespace }; } // namespace -CUBOS_REFLECT_EXTERNAL_DECL(Color); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_EMPTY, Color); CUBOS_REFLECT_EXTERNAL_IMPL(Color) { return Type::create("Color").with( diff --git a/core/tests/data/ser/json.cpp b/core/tests/data/ser/json.cpp index d588b9fcaa..15735fc348 100644 --- a/core/tests/data/ser/json.cpp +++ b/core/tests/data/ser/json.cpp @@ -47,7 +47,7 @@ namespace }; } // namespace -CUBOS_REFLECT_EXTERNAL_DECL(Color); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_EMPTY, Color); CUBOS_REFLECT_EXTERNAL_IMPL(Color) { return Type::create("Color").with( diff --git a/core/tests/reflection/reflect.cpp b/core/tests/reflection/reflect.cpp index a4e4da48f6..9956965e11 100644 --- a/core/tests/reflection/reflect.cpp +++ b/core/tests/reflection/reflect.cpp @@ -21,7 +21,7 @@ struct External { }; -CUBOS_REFLECT_EXTERNAL_DECL(External); +CUBOS_REFLECT_EXTERNAL_DECL(CUBOS_EMPTY, External); CUBOS_REFLECT_EXTERNAL_IMPL(External) { return Type::create("External");