Skip to content
Snippets Groups Projects
Commit 232693c6 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Revert "Removed FactorBase::emplace() not used (factory)"

This reverts commit e0555d44.
parent e0555d44
No related branches found
No related tags found
No related merge requests found
......@@ -140,8 +140,8 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
unsigned int getHits() const;
FactorBasePtrList& getConstrainedByList();
void link(TrajectoryBasePtr);
// template<typename classType, typename... T>
// static std::shared_ptr<FrameBase> emplace(TrajectoryBasePtr _ptr, T&&... all);
template<typename classType, typename... T>
static std::shared_ptr<FrameBase> emplace(TrajectoryBasePtr _ptr, T&&... all);
public:
static FrameBasePtr create_PO_2D (const FrameType & _tp,
......@@ -166,13 +166,13 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
namespace wolf {
//template<typename classType, typename... T>
//std::shared_ptr<FrameBase> FrameBase::emplace(TrajectoryBasePtr _ptr, T&&... all)
//{
// FrameBasePtr frm = std::make_shared<classType>(std::forward<T>(all)...);
// frm->link(_ptr);
// return frm;
//}
template<typename classType, typename... T>
std::shared_ptr<FrameBase> FrameBase::emplace(TrajectoryBasePtr _ptr, T&&... all)
{
FrameBasePtr frm = std::make_shared<classType>(std::forward<T>(all)...);
frm->link(_ptr);
return frm;
}
inline unsigned int FrameBase::id()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment