Normalize C/C++ include guards
[babeltrace.git] / src / plugins / ctf / fs-sink / fs-sink.hpp
index 355c4f45d8778b620ce67cbd66449c807702d3a6..71a1574558f9c7a4e56fe2400b17cba35d4120ed 100644 (file)
@@ -4,26 +4,29 @@
  * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
  */
 
-#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H
-#define BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H
+#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP
+#define BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP
 
 #include <glib.h>
-#include <stdbool.h>
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
+#include "cpp-common/bt2c/logging.hpp"
 
 struct fs_sink_comp
 {
-    bt_logging_level log_level;
-    bt_self_component *self_comp;
+    explicit fs_sink_comp(const bt2::SelfSinkComponent selfSinkComp) :
+        logger {selfSinkComp, "PLUGIN/SINK.CTF.FS/COMP"}
+    {
+    }
+
+    bt2c::Logger logger;
 
     /* Owned by this */
-    bt_message_iterator *upstream_iter;
+    bt_message_iterator *upstream_iter = nullptr;
 
     /* Base output directory path */
-    GString *output_dir_path;
+    GString *output_dir_path = nullptr;
 
     /*
      * True if the component assumes that it will only write a
@@ -31,25 +34,25 @@ struct fs_sink_comp
      * streams). This makes the component write the stream files
      * directly in the output directory (`output_dir_path` above).
      */
-    bool assume_single_trace;
+    bool assume_single_trace = false;
 
     /* True to completely ignore discarded events messages */
-    bool ignore_discarded_events;
+    bool ignore_discarded_events = false;
 
     /* True to completely ignore discarded packets messages */
-    bool ignore_discarded_packets;
+    bool ignore_discarded_packets = false;
 
     /*
      * True to make the component quiet (nothing printed to the
      * standard output).
      */
-    bool quiet;
+    bool quiet = false;
 
     /*
      * Hash table of `const bt_trace *` (weak) to
      * `struct fs_sink_trace *` (owned by hash table).
      */
-    GHashTable *traces;
+    GHashTable *traces = nullptr;
 };
 
 bt_component_class_initialize_method_status
@@ -64,4 +67,4 @@ ctf_fs_sink_graph_is_configured(bt_self_component_sink *component);
 
 void ctf_fs_sink_finalize(bt_self_component_sink *component);
 
-#endif /* BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_H */
+#endif /* BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_HPP */
This page took 0.029599 seconds and 4 git commands to generate.