Skip to content

Commit

Permalink
Update storage plugin child class for dashing
Browse files Browse the repository at this point in the history
Relates from ros2/rosbag2#93
  • Loading branch information
ruffsl committed Jul 10, 2019
1 parent e049075 commit c4e892e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class ROSBAG2_STORAGE_DEFAULT_PLUGINS_PUBLIC BbrStorage

void create_topic(const rosbag2_storage::TopicMetadata & topic) override;

void remove_topic(const rosbag2_storage::TopicMetadata & topic) override;

void write(std::shared_ptr<const rosbag2_storage::SerializedBagMessage> message) override;

bool has_next() override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,19 @@ void BbrStorage::create_topic(const rosbag2_storage::TopicMetadata & topic)
}
}

void BbrStorage::remove_topic(const rosbag2_storage::TopicMetadata & topic)
{
// TODO: How should this class interface be handeled with DLT transactions?
// if (topics_.find(topic.name) != std::end(topics_)) {
// auto delete_topic =
// database_->prepare_statement(
// "DELETE FROM topics where name = ? and type = ? and serialization_format = ?");
// delete_topic->bind(topic.name, topic.type, topic.serialization_format);
// delete_topic->execute_and_reset();
// topics_.erase(topic.name);
// }
}

void BbrStorage::prepare_for_writing()
{
write_statement_ = database_->prepare_statement(
Expand Down

0 comments on commit c4e892e

Please sign in to comment.