HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UNI_ID Class Reference

#include <UNI_ID.h>

+ Inheritance diagram for UNI_ID:

Public Types

using NumericType = exint
 Numerical representation of the ID. More...
 

Public Member Functions

constexpr UNI_ID (NumericType id_number=INVALID_ID)
 Explicit constructor. More...
 
constexpr void clear ()
 Resets the ID to an invalid value. More...
 
constexpr NumericType numericValue () const
 Returns the numeric value of this ID. More...
 
constexpr exint exintValue () const
 Returns an exint value of this ID. More...
 
 operator exint () const
 
constexpr bool isValid () const
 Returns true if this ID is valid; false otherwise. More...
 
constexpr operator bool () const
 Returns true if this ID is valid; false otherwise. More...
 
constexpr bool operator== (const UNI_ID &other) const
 Comparison operators. More...
 
constexpr bool operator!= (const UNI_ID &other) const
 Comparison operators. More...
 
constexpr bool operator< (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
constexpr bool operator<= (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
constexpr bool operator> (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
constexpr bool operator>= (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 

Static Public Attributes

static constexpr NumericType INVALID_ID = -1
 

Friends

size_t hash_value (const UNI_ID &id)
 Hash function for use of UNI_ID as a key in the UT_Map class. More...
 

Detailed Description

An ID for referencing elements within the UNI library, such as graphs, but also local graph's elements, like nodes, wires, etc.

Definition at line 25 of file UNI_ID.h.

Member Typedef Documentation

Numerical representation of the ID.

Definition at line 29 of file UNI_ID.h.

Constructor & Destructor Documentation

constexpr UNI_ID::UNI_ID ( NumericType  id_number = INVALID_ID)
inlineexplicit

Explicit constructor.

Definition at line 33 of file UNI_ID.h.

Member Function Documentation

constexpr void UNI_ID::clear ( )
inline

Resets the ID to an invalid value.

Definition at line 37 of file UNI_ID.h.

constexpr exint UNI_ID::exintValue ( ) const
inline

Returns an exint value of this ID.

Definition at line 74 of file UNI_ID.h.

constexpr bool UNI_ID::isValid ( ) const
inline

Returns true if this ID is valid; false otherwise.

Definition at line 41 of file UNI_ID.h.

constexpr NumericType UNI_ID::numericValue ( ) const
inline

Returns the numeric value of this ID.

Definition at line 68 of file UNI_ID.h.

constexpr UNI_ID::operator bool ( ) const
inlineexplicit

Returns true if this ID is valid; false otherwise.

Definition at line 43 of file UNI_ID.h.

UNI_ID::operator exint ( ) const
inlineexplicit

Cast to exint for use in template functions that cast templated types, but for now make it explicit, to discourage the numerical aspect of IDs.

Definition at line 82 of file UNI_ID.h.

constexpr bool UNI_ID::operator!= ( const UNI_ID other) const
inline

Comparison operators.

Definition at line 50 of file UNI_ID.h.

constexpr bool UNI_ID::operator< ( const UNI_ID other) const
inline

Remaining comparison operators, used for sorting, etc.

Definition at line 57 of file UNI_ID.h.

constexpr bool UNI_ID::operator<= ( const UNI_ID other) const
inline

Remaining comparison operators, used for sorting, etc.

Definition at line 59 of file UNI_ID.h.

constexpr bool UNI_ID::operator== ( const UNI_ID other) const
inline

Comparison operators.

Definition at line 48 of file UNI_ID.h.

constexpr bool UNI_ID::operator> ( const UNI_ID other) const
inline

Remaining comparison operators, used for sorting, etc.

Definition at line 61 of file UNI_ID.h.

constexpr bool UNI_ID::operator>= ( const UNI_ID other) const
inline

Remaining comparison operators, used for sorting, etc.

Definition at line 63 of file UNI_ID.h.

Friends And Related Function Documentation

size_t hash_value ( const UNI_ID id)
friend

Hash function for use of UNI_ID as a key in the UT_Map class.

Definition at line 86 of file UNI_ID.h.

Member Data Documentation

constexpr NumericType UNI_ID::INVALID_ID = -1
static

Definition at line 30 of file UNI_ID.h.


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