ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccUniqueIDGenerator Class Reference

#include <ecvObject.h>

Public Types

using Shared = QSharedPointer< ccUniqueIDGenerator >
 Shared type. More...
 

Public Member Functions

 ccUniqueIDGenerator ()
 Default constructor. More...
 
void reset ()
 Resets the unique ID. More...
 
unsigned fetchOne ()
 Returns a (new) unique ID. More...
 
unsigned getLast () const
 Returns the value of the last generated unique ID. More...
 
void update (unsigned ID)
 Updates the value of the last generated unique ID with the current one. More...
 

Static Public Attributes

static constexpr unsigned InvalidUniqueID = 0xFFFFFFFF
 
static constexpr unsigned MinUniqueID = 0x00000100
 

Protected Attributes

unsigned m_lastUniqueID
 

Detailed Description

Unique ID generator (should be unique for the whole application instance - with plugins, etc.)

Member Typedef Documentation

◆ Shared

Shared type.

Constructor & Destructor Documentation

◆ ccUniqueIDGenerator()

ccUniqueIDGenerator::ccUniqueIDGenerator ( )
inline

Default constructor.

Member Function Documentation

◆ fetchOne()

unsigned ccUniqueIDGenerator::fetchOne ( )
inline

Returns a (new) unique ID.

◆ getLast()

unsigned ccUniqueIDGenerator::getLast ( ) const
inline

Returns the value of the last generated unique ID.

◆ reset()

void ccUniqueIDGenerator::reset ( )
inline

Resets the unique ID.

◆ update()

void ccUniqueIDGenerator::update ( unsigned  ID)
inline

Updates the value of the last generated unique ID with the current one.

Member Data Documentation

◆ InvalidUniqueID

constexpr unsigned ccUniqueIDGenerator::InvalidUniqueID = 0xFFFFFFFF
staticconstexpr

Referenced by define_ccCircle().

◆ m_lastUniqueID

unsigned ccUniqueIDGenerator::m_lastUniqueID
protected

◆ MinUniqueID

constexpr unsigned ccUniqueIDGenerator::MinUniqueID = 0x00000100
staticconstexpr

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