struct ctf_fs_metadata
{
+ using UP = std::unique_ptr<ctf_fs_metadata>;
+
/* Owned by this */
ctf_metadata_decoder_up decoder;
- /* Owned by this */
- bt_trace_class *trace_class = nullptr;
+ bt2::TraceClass::Shared trace_class;
/* Weak (owned by `decoder` above) */
struct ctf_trace_class *tc = nullptr;
- /* Owned by this */
- char *text = nullptr;
-
int bo = 0;
};
-struct ctf_fs_trace_deleter
-{
- void operator()(ctf_fs_trace *) noexcept;
-};
-
struct ctf_fs_trace
{
- using UP = std::unique_ptr<ctf_fs_trace, ctf_fs_trace_deleter>;
+ using UP = std::unique_ptr<ctf_fs_trace>;
explicit ctf_fs_trace(const bt2c::Logger& parentLogger) :
logger {parentLogger, "PLUGIN/SRC.CTF.FS/TRACE"}
bt2c::Logger logger;
- /* Owned by this */
- struct ctf_fs_metadata *metadata = nullptr;
+ ctf_fs_metadata::UP metadata;
- /* Owned by this */
- bt_trace *trace = nullptr;
+ bt2::Trace::Shared trace;
std::vector<ctf_fs_ds_file_group::UP> ds_file_groups;
- /* Owned by this */
- GString *path = nullptr;
+ std::string path;
/* Next automatic stream ID when not provided by packet header */
uint64_t next_stream_id = 0;
struct ctf_fs_msg_iter_data
{
+ using UP = std::unique_ptr<ctf_fs_msg_iter_data>;
+
explicit ctf_fs_msg_iter_data(bt_self_message_iterator *selfMsgIter) :
self_msg_iter {selfMsgIter}, logger {bt2::SelfMessageIterator {self_msg_iter},
"PLUGIN/SRC.CTF.FS/MSG-ITER"}