From 8b28f9690646f3c84c0b307f48b2f80c64c08f6c Mon Sep 17 00:00:00 2001 From: Joan Sola <jsola@iri.upc.edu> Date: Mon, 13 Jan 2020 12:50:16 +0100 Subject: [PATCH] Add HasStateBlocks::getStateBlockVec() --- include/core/state_block/has_state_blocks.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/core/state_block/has_state_blocks.h b/include/core/state_block/has_state_blocks.h index 7adac4e23..6930a3524 100644 --- a/include/core/state_block/has_state_blocks.h +++ b/include/core/state_block/has_state_blocks.h @@ -27,6 +27,15 @@ class HasStateBlocks void appendToStructure(const std::string& _frame_type){structure_ += _frame_type;} const std::map<std::string, StateBlockPtr>& getStateBlockMap() const; std::map<std::string, StateBlockPtr>& getStateBlockMap(); + std::vector<StateBlockPtr> getStateBlockVec() const + { + std::vector<StateBlockPtr> sbv; + for (auto& key : structure_) + { + sbv.push_back(getStateBlock(key)); + } + return sbv; + } public: // Some typical shortcuts -- not all should be coded here, see notes below. -- GitLab