diff --git a/userspace/libsinsp/plugin_table_api.cpp b/userspace/libsinsp/plugin_table_api.cpp index 3f466b2cb5..e5cb54c3f7 100644 --- a/userspace/libsinsp/plugin_table_api.cpp +++ b/userspace/libsinsp/plugin_table_api.cpp @@ -509,15 +509,6 @@ struct plugin_table_wrapper : public libsinsp::state::table { return true; } - std::unique_ptr new_entry() const override { - auto res = m_input->writer_ext->create_table_entry(m_input->table); - if(res == NULL) { - throw sinsp_exception(table_input_error_prefix(m_owner, m_input.get()) + - "create entry failure: " + m_owner->get_last_error()); - } - return std::make_unique(m_owner, m_input, m_dyn_fields, res, true); - } - const char* name() const override { return m_input->name; } const ss_plugin_table_fieldinfo* list_fields(libsinsp::state::sinsp_table_owner* owner, diff --git a/userspace/libsinsp/state/table.h b/userspace/libsinsp/state/table.h index 4db21a8f20..05dd6728dd 100644 --- a/userspace/libsinsp/state/table.h +++ b/userspace/libsinsp/state/table.h @@ -175,14 +175,6 @@ class base_table { m_dynamic_fields = dynf; } - /** - * @brief Allocates and returns a new entry for the table. This is just - * a factory method, the entry will not automatically added to the table. - * Once a new entry is allocated with this method, users must invoke - * add_entry() in order to actually insert it in the table. - */ - virtual std::unique_ptr new_entry() const = 0; - /** * @brief Iterates over all the entries contained in the table and invokes * the given predicate for each of them. @@ -302,6 +294,14 @@ class built_in_table : public table { */ virtual std::shared_ptr get_entry(const KeyType& key) = 0; + /** + * @brief Allocates and returns a new entry for the table. This is just + * a factory method, the entry will not automatically added to the table. + * Once a new entry is allocated with this method, users must invoke + * add_entry() in order to actually insert it in the table. + */ + virtual std::unique_ptr new_entry() const = 0; + /** * @brief Inserts a new entry in the table with the given key. If another * entry is already present with the same key, it gets replaced. After