feisty meow concerns codebase  2.140
structures::orderable_unique_id< uniquifier > Class Template Reference

A unique identifier class that supports sorting. More...

#include <unique_id.h>

Inheritance diagram for structures::orderable_unique_id< uniquifier >:
Collaboration diagram for structures::orderable_unique_id< uniquifier >:

Public Member Functions

 orderable_unique_id (const uniquifier &initial_value)
 
 orderable_unique_id (const unique_id< uniquifier > &initial_value)
 
 ~orderable_unique_id ()
 
bool operator< (const unique_id< uniquifier > &to_compare) const
 
- Public Member Functions inherited from structures::unique_id< uniquifier >
 unique_id (uniquifier initial_value)
 Constructs a unique id from the "initial_value". More...
 
 unique_id (const unique_id< uniquifier > &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< uniquifier > &to_compare) const
 Returns true if the held id is the same as "to_compare". More...
 
unique_idoperator= (const unique_id< uniquifier > &to_copy)
 Sets this id to be the same as "to_copy". More...
 
uniquifier raw_id () const
 Returns the held identifier in its native form. More...
 
void set_raw_id (uniquifier 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

template<class uniquifier>
class structures::orderable_unique_id< uniquifier >

A unique identifier class that supports sorting.

The orderable version can be compared for magnitude and permits sorting the ids based on the underlying type. The underlying type must implement at least the less than operator.

Definition at line 77 of file unique_id.h.

Constructor & Destructor Documentation

◆ orderable_unique_id() [1/2]

template<class uniquifier >
structures::orderable_unique_id< uniquifier >::orderable_unique_id ( const uniquifier &  initial_value)
inline

Definition at line 80 of file unique_id.h.

◆ orderable_unique_id() [2/2]

template<class uniquifier >
structures::orderable_unique_id< uniquifier >::orderable_unique_id ( const unique_id< uniquifier > &  initial_value)
inline

Definition at line 82 of file unique_id.h.

◆ ~orderable_unique_id()

template<class uniquifier >
structures::orderable_unique_id< uniquifier >::~orderable_unique_id ( )
inline

Definition at line 84 of file unique_id.h.

Member Function Documentation

◆ operator<()

template<class uniquifier >
bool structures::orderable_unique_id< uniquifier >::operator< ( const unique_id< uniquifier > &  to_compare) const
inline

the "uniquifier" type absolutely must provide a less than operator (<) and it must meet the requirements of the "unique_id" template.

Definition at line 88 of file unique_id.h.

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


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