Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[All] FIX VS2017 build (Windows) #630

Merged
merged 2 commits into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions SofaKernel/modules/SofaBaseCollision/DiscreteIntersection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
namespace sofa
{

namespace core
{
namespace collision
{
template class SOFA_BASE_COLLISION_API IntersectorFactory<component::collision::DiscreteIntersection>;
}
}


namespace component
{

Expand Down Expand Up @@ -72,7 +81,7 @@ DiscreteIntersection::DiscreteIntersection()
intersectors.add<RigidCapsuleModel,OBBModel,DiscreteIntersection>(this);
intersectors.add<RigidCapsuleModel,RigidSphereModel,DiscreteIntersection>(this);

IntersectorFactory::getInstance()->addIntersectors(this);
IntersectorFactory::getInstance()->addIntersectors(this);
}

/// Return the intersector class handling the given pair of collision models, or NULL if not supported.
Expand All @@ -86,13 +95,5 @@ ElementIntersector* DiscreteIntersection::findIntersector(core::CollisionModel*

} // namespace component

namespace core
{
namespace collision
{
template class SOFA_BASE_COLLISION_API IntersectorFactory<component::collision::DiscreteIntersection>;
}
}

} // namespace sofa

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
namespace sofa
{

namespace core
{
namespace collision
{
template class SOFA_BASE_COLLISION_API IntersectorFactory<component::collision::MinProximityIntersection>;
}
}

namespace component
{

Expand Down Expand Up @@ -97,13 +105,5 @@ void MinProximityIntersection::draw(const core::visual::VisualParams* vparams)

} // namespace component

namespace core
{
namespace collision
{
template class SOFA_BASE_COLLISION_API IntersectorFactory<component::collision::MinProximityIntersection>;
}
}

} // namespace sofa

Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@
#include <iostream>
#include <algorithm>


namespace sofa
{

namespace core
{
namespace collision
{
template class SOFA_BASE_COLLISION_API IntersectorFactory<component::collision::NewProximityIntersection>;
}
}

namespace component
{

Expand Down Expand Up @@ -83,13 +90,5 @@ void NewProximityIntersection::init()

} // namespace component

namespace core
{
namespace collision
{
template class SOFA_BASE_COLLISION_API IntersectorFactory<component::collision::NewProximityIntersection>;
}
}

} // namespace sofa

18 changes: 18 additions & 0 deletions applications/sofa/gui/qt/DataWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <QToolTip>

#define SIZE_TEXT 60


namespace sofa
{
namespace helper
Expand Down Expand Up @@ -157,6 +159,22 @@ DataWidget::setWidgetDirty(bool b)
dirty = b;
Q_EMIT WidgetDirty(b);
}

typedef sofa::helper::Factory<std::string, DataWidget, DataWidget::CreatorArgument> DataWidgetFactory;

DataWidget *DataWidget::CreateDataWidget(const DataWidget::CreatorArgument &dwarg)
{
DataWidget *datawidget_ = 0;
const std::string &widgetName=dwarg.data->getWidget();
if (widgetName.empty())
datawidget_ = DataWidgetFactory::CreateAnyObject(dwarg);
else
datawidget_ = DataWidgetFactory::CreateObject(widgetName, dwarg);

return datawidget_;
}


/*QDisplayDataInfoWidget definitions */

QDisplayDataInfoWidget::QDisplayDataInfoWidget(QWidget* parent, const std::string& helper,
Expand Down
18 changes: 2 additions & 16 deletions applications/sofa/gui/qt/DataWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,8 @@ class SOFA_SOFAGUIQT_API DataWidget : public QWidget
}
return instance;
}

typedef sofa::helper::Factory<std::string, DataWidget, DataWidget::CreatorArgument> DataWidgetFactory;


static DataWidget *CreateDataWidget(const DataWidget::CreatorArgument &dwarg)
{

DataWidget *datawidget_=0;
const std::string &widgetName=dwarg.data->getWidget();
if (widgetName.empty())
datawidget_ = DataWidgetFactory::CreateAnyObject(dwarg);
else
datawidget_ = DataWidgetFactory::CreateObject(widgetName, dwarg);

return datawidget_;
}

static DataWidget *CreateDataWidget(const DataWidget::CreatorArgument &dwarg);


public slots:
Expand Down
16 changes: 8 additions & 8 deletions modules/SofaConstraint/LocalMinDistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
namespace sofa
{

namespace core
{
namespace collision
{
template class SOFA_CONSTRAINT_API IntersectorFactory<component::collision::LocalMinDistance>;
}
}

namespace component
{

Expand Down Expand Up @@ -1481,13 +1489,5 @@ void LocalMinDistance::draw(const core::visual::VisualParams* vparams)

} // namespace component

namespace core
{
namespace collision
{
template class SOFA_CONSTRAINT_API IntersectorFactory<component::collision::LocalMinDistance>;
}
}

} // namespace sofa

11 changes: 6 additions & 5 deletions modules/SofaUserInteraction/ComponentMouseInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@
#include <sofa/defaulttype/RigidTypes.h>
#include <sofa/helper/Factory.inl>


using namespace sofa::simulation;

namespace sofa
{
namespace helper
{
template class SOFA_USER_INTERACTION_API Factory<std::string, component::collision::ComponentMouseInteraction, core::objectmodel::BaseContext*>;
}

namespace component
{
Expand Down Expand Up @@ -110,9 +113,7 @@ helper::Creator<ComponentMouseInteraction::ComponentMouseInteractionFactory, TCo
#endif

}

}
namespace helper
{
template class SOFA_USER_INTERACTION_API Factory<std::string, component::collision::ComponentMouseInteraction, core::objectmodel::BaseContext*>;
}

}