Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move get_storage_identifier and get_bagfile_size #209

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ class ROSBAG2_STORAGE_PUBLIC BaseInfoInterface
* \returns the relative path.
*/
virtual std::string get_relative_file_path() const = 0;

/**
* Returns the size of the bagfile.
* \returns the size of the bagfile in bytes.
*/
virtual uint64_t get_bagfile_size() const = 0;
Comment on lines +43 to +47
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't #197 state to have bagfile size part of the IO interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I accidentally re-worded the issue and flipped the function migration.
I'll re-review this work in a few hours

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update:
The correct wordage should be: "get_bagfile_size and get_storage_identifier should be moved to BaseInfoInterface".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update:
Corrected wordage in issue


/**
* Returns the identifier for the storage plugin.
* \returns the identifier.
*/
virtual std::string get_storage_identifier() const = 0;
};

} // namespace storage_interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ class ROSBAG2_STORAGE_PUBLIC BaseIOInterface
* The storage plugin will append the uri in the case of creating a new bagfile backing.
*/
virtual void open(const std::string & uri, IOFlag io_flag) = 0;

/**
* Returns the size of the bagfile.
* \returns the size of the bagfile in bytes.
*/
virtual uint64_t get_bagfile_size() const = 0;

/**
* Returns the identifier for the storage plugin.
* \returns the identifier.
*/
virtual std::string get_storage_identifier() const = 0;
};

} // namespace storage_interfaces
Expand Down