From 8c0c6b70b84ba5e911398bf0ed4c389375a4fb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Sat, 19 Dec 2020 15:06:26 +0100 Subject: [PATCH] Inprove file organization --- include/core/frame/frame_base.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/core/frame/frame_base.h b/include/core/frame/frame_base.h index d1cb69dc4..baf67a4ae 100644 --- a/include/core/frame/frame_base.h +++ b/include/core/frame/frame_base.h @@ -62,15 +62,20 @@ class FrameBase : public NodeBase, public HasStateBlocks, public std::enable_sha const std::list<VectorXd>& _vectors); ~FrameBase() override; + + // Add and remove from WOLF tree --------------------------------- + template<typename classType, typename... T> + static std::shared_ptr<classType> emplaceFrame(TrajectoryBasePtr _ptr, T&&... all); + + void link(TrajectoryBasePtr); + void link(ProblemPtr _prb); + virtual void remove(bool viral_remove_empty_parent=false); // Frame properties ----------------------------------------------- public: unsigned int id() const; - // link to problem - void link(ProblemPtr _prb); - // Frame values ------------------------------------------------ public: void setTimeStamp(const TimeStamp& _ts); @@ -105,15 +110,14 @@ class FrameBase : public NodeBase, public HasStateBlocks, public std::enable_sha FactorBasePtr getFactorOf(const ProcessorBasePtr _processor_ptr) const; FactorBasePtr getFactorOf(const ProcessorBasePtr _processor_ptr, const std::string& type) const; - void getFactorList(FactorBasePtrList& _fac_list) const; + unsigned int getHits() const; const FactorBasePtrList& getConstrainedByList() const; bool isConstrainedBy(const FactorBasePtr& _factor) const; - void link(TrajectoryBasePtr); - template<typename classType, typename... T> - static std::shared_ptr<classType> emplaceFrame(TrajectoryBasePtr _ptr, T&&... all); + + // Debug and info ------------------------------------------------------- virtual void printHeader(int depth, // bool constr_by, // bool metric, // -- GitLab