TAMSVIZ
Visualization and annotation tool for ROS
snapshot.cpp
1 // TAMSVIZ
2 // (c) 2020 Philipp Ruppel
3 
4 #include "snapshot.h"
5 
6 #include <atomic>
7 
8 static std::atomic<size_t> g_snapshot_count;
9 
10 SnapshotBase::SnapshotBase() { g_snapshot_count++; }
11 
12 SnapshotBase::SnapshotBase(const SnapshotBase &other) { g_snapshot_count++; }
13 
14 SnapshotBase::~SnapshotBase() { g_snapshot_count--; }
15 
16 size_t SnapshotBase::instanceCount() { return g_snapshot_count; }