From caccd39db5b1e286cd06b3406ccd8587a1c5762a Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 18 Jun 2024 11:34:18 -0700 Subject: [PATCH] Add missing overloads for get_info --- morpheus/_lib/include/morpheus/messages/meta.hpp | 4 ++++ morpheus/_lib/src/messages/meta.cpp | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/morpheus/_lib/include/morpheus/messages/meta.hpp b/morpheus/_lib/include/morpheus/messages/meta.hpp index 750236df4a..3ee4863af3 100644 --- a/morpheus/_lib/include/morpheus/messages/meta.hpp +++ b/morpheus/_lib/include/morpheus/messages/meta.hpp @@ -189,6 +189,10 @@ class MORPHEUS_EXPORT SlicedMessageMeta : public MessageMeta TableInfo get_info() const override; + TableInfo get_info(const std::string& col_name) const override; + + TableInfo get_info(const std::vector& column_names) const override; + MutableTableInfo get_mutable_info() const override; std::optional ensure_sliceable_index() override; diff --git a/morpheus/_lib/src/messages/meta.cpp b/morpheus/_lib/src/messages/meta.cpp index b141a0e6f0..c9de4eda7f 100644 --- a/morpheus/_lib/src/messages/meta.cpp +++ b/morpheus/_lib/src/messages/meta.cpp @@ -535,6 +535,20 @@ TableInfo SlicedMessageMeta::get_info() const return this->m_data->get_info().get_slice(m_start, m_stop, m_column_names); } +TableInfo SlicedMessageMeta::get_info(const std::string& col_name) const +{ + auto full_info = this->m_data->get_info(); + + return full_info.get_slice(m_start, m_stop, {col_name}); +} + +TableInfo SlicedMessageMeta::get_info(const std::vector& column_names) const +{ + auto full_info = this->m_data->get_info(); + + return full_info.get_slice(m_start, m_stop, column_names); +} + MutableTableInfo SlicedMessageMeta::get_mutable_info() const { return this->m_data->get_mutable_info().get_slice(m_start, m_stop, m_column_names);