helics  3.5.1
Public Types | Public Member Functions | Static Public Attributes | List of all members
helics::IdentifierId< BaseType, ID, invalidValue > Class Template Reference

#include <helicsTypes.hpp>

Public Types

using UnderlyingType = BaseType
 

Public Member Functions

constexpr IdentifierId () noexcept
 
constexpr IdentifierId (BaseType val) noexcept
 
constexpr IdentifierId (const IdentifierId &id) noexcept
 
IdentifierIdoperator= (BaseType val) noexcept
 
IdentifierIdoperator= (const IdentifierId &id)=default
 
BaseType value () const noexcept
 
bool operator== (IdentifierId id) const noexcept
 
bool operator!= (IdentifierId id) const noexcept
 
bool operator< (IdentifierId id) const noexcept
 
bool isValid () const noexcept
 

Static Public Attributes

static const Identifiers identity {ID}
 the type of the identifier
 

Detailed Description

template<typename BaseType, Identifiers ID, BaseType invalidValue>
class helics::IdentifierId< BaseType, ID, invalidValue >

class defining an identifier type

the intent of this class is to limit the operations available on an identifier to those that are a actually required and make sense, and make it as low impact as possible. it also acts to limit any mistakes of on type of identifier for another

Constructor & Destructor Documentation

◆ IdentifierId() [1/3]

template<typename BaseType , Identifiers ID, BaseType invalidValue>
constexpr helics::IdentifierId< BaseType, ID, invalidValue >::IdentifierId ( )
inlineconstexprnoexcept

default constructor

◆ IdentifierId() [2/3]

template<typename BaseType , Identifiers ID, BaseType invalidValue>
constexpr helics::IdentifierId< BaseType, ID, invalidValue >::IdentifierId ( BaseType  val)
inlineexplicitconstexprnoexcept

value based constructor

◆ IdentifierId() [3/3]

template<typename BaseType , Identifiers ID, BaseType invalidValue>
constexpr helics::IdentifierId< BaseType, ID, invalidValue >::IdentifierId ( const IdentifierId< BaseType, ID, invalidValue > &  id)
inlineconstexprnoexcept

copy constructor

Member Function Documentation

◆ operator!=()

template<typename BaseType , Identifiers ID, BaseType invalidValue>
bool helics::IdentifierId< BaseType, ID, invalidValue >::operator!= ( IdentifierId< BaseType, ID, invalidValue id) const
inlinenoexcept

inequality operator

◆ operator<()

template<typename BaseType , Identifiers ID, BaseType invalidValue>
bool helics::IdentifierId< BaseType, ID, invalidValue >::operator< ( IdentifierId< BaseType, ID, invalidValue id) const
inlinenoexcept

less than operator for sorting

◆ operator=() [1/2]

template<typename BaseType , Identifiers ID, BaseType invalidValue>
IdentifierId& helics::IdentifierId< BaseType, ID, invalidValue >::operator= ( BaseType  val)
inlinenoexcept

assignment from number

◆ operator=() [2/2]

template<typename BaseType , Identifiers ID, BaseType invalidValue>
IdentifierId& helics::IdentifierId< BaseType, ID, invalidValue >::operator= ( const IdentifierId< BaseType, ID, invalidValue > &  id)
default

copy assignment

◆ operator==()

template<typename BaseType , Identifiers ID, BaseType invalidValue>
bool helics::IdentifierId< BaseType, ID, invalidValue >::operator== ( IdentifierId< BaseType, ID, invalidValue id) const
inlinenoexcept

equality operator

◆ value()

template<typename BaseType , Identifiers ID, BaseType invalidValue>
BaseType helics::IdentifierId< BaseType, ID, invalidValue >::value ( ) const
inlinenoexcept

get the underlying value


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