feisty meow concerns codebase  2.140
structures::unique_int Class Reference

A unique identifier based on integers. More...

#include <unique_id.h>

Inheritance diagram for structures::unique_int:
Collaboration diagram for structures::unique_int:

Public Member Functions

 unique_int (int initial=0)
 implicit default for "initial" of zero indicates bogus id. More...
 
bool operator! () const
 provides a way to test whether an id is valid. More...
 
- Public Member Functions inherited from structures::unique_id< int >
 unique_id (int initial_value)
 Constructs a unique id from the "initial_value". More...
 
 unique_id (const unique_id< int > &to_copy)
 Constructs a unique id as a copy of the "to_copy" object. More...
 
 ~unique_id ()
 
virtual bool equal_to (const equalizable &to_compare) const
 
bool operator== (const unique_id< int > &to_compare) const
 Returns true if the held id is the same as "to_compare". More...
 
unique_idoperator= (const unique_id< int > &to_copy)
 Sets this id to be the same as "to_copy". More...
 
int raw_id () const
 Returns the held identifier in its native form. More...
 
void set_raw_id (int new_value)
 Sets the held identifier to "new_value". More...
 
- Public Member Functions inherited from basis::equalizable
virtual bool equal_to (const equalizable &s2) const =0
 
virtual bool operator== (const equalizable &s2) const
 the virtual method for object equality. More...
 

Detailed Description

A unique identifier based on integers.

Definition at line 96 of file unique_id.h.

Constructor & Destructor Documentation

◆ unique_int()

structures::unique_int::unique_int ( int  initial = 0)
inline

implicit default for "initial" of zero indicates bogus id.

Definition at line 99 of file unique_id.h.

Member Function Documentation

◆ operator!()

bool structures::unique_int::operator! ( ) const
inline

provides a way to test whether an id is valid.

This uses the implicit assumption that a zero id is invalid or unassigned.

Definition at line 102 of file unique_id.h.

References structures::unique_id< int >::raw_id().


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