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

#include <helicsTypes.hpp>

Public Types

using underlyingType = BaseType
 

Public Member Functions

constexpr identifier_id_t () noexcept
 
constexpr identifier_id_t (BaseType val) noexcept
 
constexpr identifier_id_t (const identifier_id_t &id) noexcept
 
identifier_id_toperator= (BaseType val) noexcept
 
identifier_id_toperator= (const identifier_id_t &id)=default
 
BaseType value () const noexcept
 
bool operator== (identifier_id_t id) const noexcept
 
bool operator!= (identifier_id_t id) const noexcept
 
bool operator< (identifier_id_t 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::identifier_id_t< 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

◆ identifier_id_t() [1/3]

template<typename BaseType , identifiers ID, BaseType invalidValue>
constexpr helics::identifier_id_t< BaseType, ID, invalidValue >::identifier_id_t ( )
inlineconstexprnoexcept

default constructor

◆ identifier_id_t() [2/3]

template<typename BaseType , identifiers ID, BaseType invalidValue>
constexpr helics::identifier_id_t< BaseType, ID, invalidValue >::identifier_id_t ( BaseType  val)
inlineexplicitconstexprnoexcept

value based constructor

◆ identifier_id_t() [3/3]

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

copy constructor

Member Function Documentation

◆ operator!=()

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

inequality operator

◆ operator<()

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

less than operator for sorting

◆ operator=() [1/2]

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

assignment from number

◆ operator=() [2/2]

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

copy assignment

◆ operator==()

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

equality operator

◆ value()

template<typename BaseType , identifiers ID, BaseType invalidValue>
BaseType helics::identifier_id_t< BaseType, ID, invalidValue >::value ( ) const
inlinenoexcept

get the underlying value

Referenced by helics::Federate::queryComplete().


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