12 const std::string& name)
25 std::stringstream log_prefix_string_stream;
26 log_prefix_string_stream <<
"[" << name <<
"] ";
37 std::lock_guard<std::mutex> lock(
mutex_);
38 int next_number =
next_();
45 std::lock_guard<std::mutex> lock(
mutex_);
51 std::lock_guard<std::mutex> lock(
mutex_);
int last_number_
Last Fibonacci number.
virtual int nextAndLog(const std::string &log_prefix="")
virtual void setMax(const int &value)
int current_number_
Current Fibonacci number.
std::mutex mutex_
Mutex for locking.
virtual ~AtomicFibonacci()
std::atomic< int > max_number_
Max Fibonacci number before reseting the sequence.
#define ROS_INFO_STREAM(args)
std::string log_prefix_
Log prefix.