log_store.h
Go to the documentation of this file.
1 
28 #ifndef LOG_VIEW_LOG_STORE_H_
29 #define LOG_VIEW_LOG_STORE_H_
30 
31 #include <deque>
32 #include <mutex>
33 
34 #include <log_view/datatypes.h>
35 #include <rosgraph_msgs/Log.h>
36 
37 namespace log_view {
38 
39 class LogStore {
40 public:
41  LogStore() = default;
42 
43  const std::deque<LogEntry>& logs();
44  size_t size() const;
45 
46  void addEntry(const rosgraph_msgs::LogConstPtr& msg);
47 
48 private:
49  std::deque<LogEntry> logs_;
50  std::deque<LogEntry> new_logs_;
51 
52  std::mutex mutex_;
53 
54 };
55 typedef std::shared_ptr<LogStore> LogStorePtr;
56 
57 } // namespace log_view
58 
59 #endif // LOG_VIEW_LOG_STORE_H_
size_t size() const
Definition: log_store.cpp:41
std::shared_ptr< LogStore > LogStorePtr
Definition: log_store.h:55
std::deque< LogEntry > logs_
Definition: log_store.h:49
const std::deque< LogEntry > & logs()
Definition: log_store.cpp:32
std::mutex mutex_
Definition: log_store.h:52
void addEntry(const rosgraph_msgs::LogConstPtr &msg)
Definition: log_store.cpp:45
std::deque< LogEntry > new_logs_
Definition: log_store.h:50


log_view
Author(s): Marc Alban
autogenerated on Thu Mar 4 2021 03:21:52