24 #include "MACoreTypes.hpp" 34 #define MA_RANDOM_POINT_1(_variable_name, _min, _max) \ 36 int _variable_name = MARandomness::IsAnyRegisteredPoint() ? \ 37 MARandomness::QueryRandomPoint(__PRETTY_FUNCTION__, 1, _min)[0] : \ 38 MARandomness::GenerateRandomPoint(__PRETTY_FUNCTION__, 1, _min, _max)[0]; 41 #define MA_RANDOM_POINT_N(_variable_name, _count, _min, _max) \ 42 MC::IntList _variable_name = \ 43 MARandomness::IsAnyRegisteredPoint() ? \ 44 MARandomness::QueryRandomPoint(__PRETTY_FUNCTION__, _count, _min) : \ 45 MARandomness::GenerateRandomPoint(__PRETTY_FUNCTION__, _count, _min, _max); 90 const MC::IntList& numbers);
103 static MC::IntList
QueryRandomPoint(
const std::string&
id,
unsigned int count,
int min);
123 static inline void LogRandomPoint(
const std::string&
id,
const MC::IntList& numbers);
static void LogRandomPoint(const std::string &id, const MC::IntList &numbers)
Log a random point.
static void RegisterRandomPoint(int64_t timestamp, const std::string &id, const int number)
Register a random point with a single number.
static MC::IntList GenerateRandomPoint(const std::string &id, unsigned int count, int min, int max)
Generate a random point.
static bool IsAnyRegisteredPoint()
Check if there is any registered random point.
static MC::IntList QueryRandomPoint(const std::string &id, unsigned int count, int min)
Query a random point.