From 66bb2a21d0bdc7bbae9520baaa462b770020f482 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 11 Aug 2021 19:08:36 -0700 Subject: [PATCH] Try the ign-gui plugins approach Signed-off-by: Louise Poubel --- include/ignition/gazebo/detail/View.hh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/include/ignition/gazebo/detail/View.hh b/include/ignition/gazebo/detail/View.hh index 865cca6877..2b8fdb48bd 100644 --- a/include/ignition/gazebo/detail/View.hh +++ b/include/ignition/gazebo/detail/View.hh @@ -28,6 +28,17 @@ #include "ignition/gazebo/config.hh" #include "ignition/gazebo/detail/BaseView.hh" +// TODO(chapulina) Remove hardcoded 6 +#ifndef _WIN32 +# define ignition_gazebo_EXPORTS_API +#else +# if (defined(ignition_gazebo6_EXPORTS)) +# define ignition_gazebo_EXPORTS_API __declspec(dllexport) +# else +# define ignition_gazebo_EXPORTS_API __declspec(dllimport) +# endif +#endif + namespace ignition { namespace gazebo @@ -39,7 +50,7 @@ namespace detail /// \brief A view that caches a particular set of component type data. /// \tparam ComponentTypeTs The component type(s) that are stored in this view. template -class IGNITION_GAZEBO_VISIBLE View : public BaseView +class ignition_gazebo_EXPORTS_API View : public BaseView { /// \brief Alias for containers that hold and entity and its component data. /// The component types held in this container match the component types that @@ -147,7 +158,6 @@ class IGNITION_GAZEBO_VISIBLE View : public BaseView ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE View::View() { this->componentTypes = {ComponentTypeTs::typeId...}; @@ -155,7 +165,6 @@ View::View() ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE bool View::HasCachedComponentData( const Entity _entity) const { @@ -182,7 +191,6 @@ bool View::HasCachedComponentData( ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE bool View::RemoveEntity(const Entity _entity) { this->invalidData.erase(_entity); @@ -204,7 +212,6 @@ bool View::RemoveEntity(const Entity _entity) ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE typename View::ConstComponentData View::EntityComponentConstData(const Entity _entity) const { @@ -213,7 +220,6 @@ typename View::ConstComponentData ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE typename View::ComponentData View::EntityComponentData(const Entity _entity) { @@ -222,7 +228,6 @@ typename View::ComponentData ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE void View::AddEntityWithConstComps(const Entity &_entity, const bool _new, const ComponentTypeTs*... _compPtrs) { @@ -234,7 +239,6 @@ void View::AddEntityWithConstComps(const Entity &_entity, ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE void View::AddEntityWithComps(const Entity &_entity, const bool _new, ComponentTypeTs*... _compPtrs) { @@ -246,7 +250,6 @@ void View::AddEntityWithComps(const Entity &_entity, ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE bool View::NotifyComponentAddition(const Entity _entity, bool _newEntity, const ComponentTypeId _typeId) { @@ -285,7 +288,6 @@ bool View::NotifyComponentAddition(const Entity _entity, ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE bool View::NotifyComponentRemoval(const Entity _entity, const ComponentTypeId _typeId) { @@ -318,7 +320,6 @@ bool View::NotifyComponentRemoval(const Entity _entity, ////////////////////////////////////////////////// template -IGNITION_GAZEBO_VISIBLE void View::Reset() { // reset all data structures in the BaseView except for componentTypes since