Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
GUIDGenerator Class Reference

#include <guid.h>

Public Member Functions

 GUIDGenerator ()
 
MyGUID next ()
 Generates the next GUID, which it will never return again.
 

Private Attributes

std::mt19937_64 m_rand
 
std::uniform_int_distribution< u64 > m_uniform
 

Constructor & Destructor Documentation

◆ GUIDGenerator()

GUIDGenerator::GUIDGenerator ( )

References m_rand, myrand_bytes(), and porting::secure_rand_fill_buf().

+ Here is the call graph for this function:

Member Function Documentation

◆ next()

MyGUID GUIDGenerator::next ( )

Generates the next GUID, which it will never return again.

Returns
the new GUID

References m_rand, and m_uniform.

Referenced by LuaEntitySAO::LuaEntitySAO().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_rand

std::mt19937_64 GUIDGenerator::m_rand
private

Referenced by GUIDGenerator(), and next().

◆ m_uniform

std::uniform_int_distribution<u64> GUIDGenerator::m_uniform
private

Referenced by next().


The documentation for this class was generated from the following files: