helics  3.0.1
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
 
bool operator== (GlobalFederateId id) const noexcept
 
bool operator!= (GlobalFederateId id) const noexcept
 
bool operator< (GlobalFederateId id) const noexcept
 
bool operator> (GlobalFederateId id) const noexcept
 
bool operator== (GlobalBrokerId id) const noexcept
 
bool operator!= (GlobalBrokerId id) const noexcept
 
bool operator< (GlobalBrokerId id) const noexcept
 
bool operator> (GlobalBrokerId id) const noexcept
 
bool isFederate () const
 
bool isBroker () const
 
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()

bool helics::GlobalFederateId::isBroker ( ) const
inline

return true if the broker_id is a valid broker id code

◆ isFederate()

bool helics::GlobalFederateId::isFederate ( ) const
inline

return true if the broker_id is a valid federate id code

◆ isValid()

bool helics::GlobalFederateId::isValid ( ) const
inline

return true if the broker_id is a valid broker id code

◆ localIndex()

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

generate a local offset index

the global_id is shifted by a certain amount

◆ operator!=() [1/2]

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

inequality operator

◆ operator!=() [2/2]

bool helics::GlobalFederateId::operator!= ( GlobalFederateId  id) const
inlinenoexcept

inequality operator

◆ operator<() [1/2]

bool helics::GlobalFederateId::operator< ( GlobalBrokerId  id) const
inlinenoexcept

less than operator for sorting

◆ operator<() [2/2]

bool helics::GlobalFederateId::operator< ( GlobalFederateId  id) const
inlinenoexcept

less than operator for sorting

◆ operator==() [1/2]

bool helics::GlobalFederateId::operator== ( GlobalBrokerId  id) const
inlinenoexcept

equality operator

◆ operator==() [2/2]

bool helics::GlobalFederateId::operator== ( GlobalFederateId  id) const
inlinenoexcept

equality operator

◆ operator>() [1/2]

bool helics::GlobalFederateId::operator> ( GlobalBrokerId  id) const
inlinenoexcept

greater than operator for sorting

◆ operator>() [2/2]

bool helics::GlobalFederateId::operator> ( GlobalFederateId  id) const
inlinenoexcept

greater than operator for sorting


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