helics  3.5.2
Public Types | Public Member Functions | List of all members
helics::GlobalFederateId Class Reference

#include <GlobalFederateId.hpp>

Public Types

using BaseType = IdentifierBaseType
 

Public Member Functions

constexpr GlobalFederateId ()=default
 
constexpr GlobalFederateId (BaseType val) noexcept
 
constexpr GlobalFederateId (GlobalBrokerId id) noexcept
 
constexpr operator GlobalBrokerId () const noexcept
 
constexpr BaseType baseValue () const
 
constexpr bool operator== (GlobalFederateId id) const noexcept
 
constexpr bool operator!= (GlobalFederateId id) const noexcept
 
constexpr bool operator< (GlobalFederateId id) const noexcept
 
constexpr bool operator> (GlobalFederateId id) const noexcept
 
constexpr bool operator== (GlobalBrokerId id) const noexcept
 
constexpr bool operator!= (GlobalBrokerId id) const noexcept
 
constexpr bool operator< (GlobalBrokerId id) const noexcept
 
constexpr bool operator> (GlobalBrokerId id) const noexcept
 
constexpr bool isFederate () const
 
constexpr bool isBroker () const
 
constexpr bool isValid () const
 
constexpr BaseType localIndex () const
 
BaseType * getBaseTypePointer ()
 

Detailed Description

class holder a globally unique identifier for federates

Constructor & Destructor Documentation

◆ GlobalFederateId() [1/2]

constexpr helics::GlobalFederateId::GlobalFederateId ( )
constexprdefault

default constructor

◆ GlobalFederateId() [2/2]

constexpr helics::GlobalFederateId::GlobalFederateId ( GlobalBrokerId  id)
inlineconstexprnoexcept

implicit conversion from global_id

Member Function Documentation

◆ baseValue()

constexpr BaseType helics::GlobalFederateId::baseValue ( ) const
inlineconstexpr

◆ getBaseTypePointer()

BaseType* helics::GlobalFederateId::getBaseTypePointer ( )
inline

get a pointer to the index value type for copying from memory

Referenced by helics::ActionMessage::fromByteArray().

◆ isBroker()

constexpr bool helics::GlobalFederateId::isBroker ( ) const
inlineconstexpr

return true if the broker_id is a valid broker id code

References helics::gGlobalBrokerIdShift.

◆ isFederate()

constexpr bool helics::GlobalFederateId::isFederate ( ) const
inlineconstexpr

return true if the broker_id is a valid federate id code

References helics::gGlobalBrokerIdShift, and helics::gGlobalFederateIdShift.

Referenced by helics::TimeDependencies::getMinDependency().

◆ isValid()

constexpr bool helics::GlobalFederateId::isValid ( ) const
inlineconstexpr

◆ localIndex()

constexpr BaseType helics::GlobalFederateId::localIndex ( ) const
inlineconstexpr

generate a local offset index

the global_id is shifted by a certain amount

References helics::gGlobalFederateIdShift.

◆ operator!=() [1/2]

constexpr bool helics::GlobalFederateId::operator!= ( GlobalBrokerId  id) const
inlineconstexprnoexcept

inequality operator

◆ operator!=() [2/2]

constexpr bool helics::GlobalFederateId::operator!= ( GlobalFederateId  id) const
inlineconstexprnoexcept

inequality operator

◆ operator<() [1/2]

constexpr bool helics::GlobalFederateId::operator< ( GlobalBrokerId  id) const
inlineconstexprnoexcept

less than operator for sorting

◆ operator<() [2/2]

constexpr bool helics::GlobalFederateId::operator< ( GlobalFederateId  id) const
inlineconstexprnoexcept

less than operator for sorting

◆ operator==() [1/2]

constexpr bool helics::GlobalFederateId::operator== ( GlobalBrokerId  id) const
inlineconstexprnoexcept

equality operator

◆ operator==() [2/2]

constexpr bool helics::GlobalFederateId::operator== ( GlobalFederateId  id) const
inlineconstexprnoexcept

equality operator

◆ operator>() [1/2]

constexpr bool helics::GlobalFederateId::operator> ( GlobalBrokerId  id) const
inlineconstexprnoexcept

greater than operator for sorting

◆ operator>() [2/2]

constexpr bool helics::GlobalFederateId::operator> ( GlobalFederateId  id) const
inlineconstexprnoexcept

greater than operator for sorting


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