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.)

Definition at line 22 of file ecvObject.h.

Member Typedef Documentation

◆ Shared

Shared type.

Definition at line 28 of file ecvObject.h.

Constructor & Destructor Documentation

◆ ccUniqueIDGenerator()

ccUniqueIDGenerator::ccUniqueIDGenerator ( )
inline

Default constructor.

Definition at line 31 of file ecvObject.h.

Member Function Documentation

◆ fetchOne()

unsigned ccUniqueIDGenerator::fetchOne ( )
inline

Returns a (new) unique ID.

Definition at line 36 of file ecvObject.h.

◆ getLast()

unsigned ccUniqueIDGenerator::getLast ( ) const
inline

Returns the value of the last generated unique ID.

Definition at line 38 of file ecvObject.h.

◆ reset()

void ccUniqueIDGenerator::reset ( )
inline

Resets the unique ID.

Definition at line 34 of file ecvObject.h.

◆ update()

void ccUniqueIDGenerator::update ( unsigned  ID)
inline

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

Definition at line 40 of file ecvObject.h.

Member Data Documentation

◆ InvalidUniqueID

constexpr unsigned ccUniqueIDGenerator::InvalidUniqueID = 0xFFFFFFFF
staticconstexpr

Definition at line 24 of file ecvObject.h.

Referenced by define_ccCircle(), and cloudViewer::geometry::pybind_polyline().

◆ m_lastUniqueID

unsigned ccUniqueIDGenerator::m_lastUniqueID
protected

Definition at line 45 of file ecvObject.h.

◆ MinUniqueID

constexpr unsigned ccUniqueIDGenerator::MinUniqueID = 0x00000100
staticconstexpr

Definition at line 25 of file ecvObject.h.


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