| helics 3.6.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
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 | ( |  | ) |
| constexpr default

default constructor

## ◆ GlobalFederateId() [2/2]

constexpr helics::GlobalFederateId::GlobalFederateId | ( | GlobalBrokerId | id | ) |
| inline constexpr noexcept

implicit conversion from global_id

## Member Function Documentation

## ◆ baseValue()

constexpr BaseType helics::GlobalFederateId::baseValue | ( |  | ) | const
| inline constexpr

conversion to the BaseType

Referenced by helics::BaseTimeCoordinator::generateTimeRequest(), helics::GlobalHandle::operator uint64_t(), helics::prettyPrintString(), helics::TimeCoordinator::sendUpdatedExecRequest(), helics::ActionMessage::to_json_string(), and helics::ActionMessage::toByteArray().

## ◆ 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
| inline constexpr

return true if the broker_id is a valid broker id code

References helics::gGlobalBrokerIdShift.

## ◆ isFederate()

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

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
| inline constexpr

return true if the broker_id is a valid broker id code

Referenced by helics::TimeCoordinator::checkExecEntry(), helics::TimeCoordinator::checkTimeGrant(), helics::generateInterfaceQueryResults(), helics::GlobalHandle::isValid(), and helics::TimeCoordinator::sendUpdatedExecRequest().

## ◆ localIndex()

constexpr BaseType helics::GlobalFederateId::localIndex | ( |  | ) | const
| inline constexpr

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
| inline constexpr noexcept

inequality operator

## ◆ operator!=() [2/2]

constexpr bool helics::GlobalFederateId::operator!= | ( | GlobalFederateId | id | ) | const
| inline constexpr noexcept

inequality operator

## ◆ operator<() [1/2]

constexpr bool helics::GlobalFederateId::operator< | ( | GlobalBrokerId | id | ) | const
| inline constexpr noexcept

less than operator for sorting

## ◆ operator<() [2/2]

constexpr bool helics::GlobalFederateId::operator< | ( | GlobalFederateId | id | ) | const
| inline constexpr noexcept

less than operator for sorting

## ◆ operator==() [1/2]

constexpr bool helics::GlobalFederateId::operator== | ( | GlobalBrokerId | id | ) | const
| inline constexpr noexcept

equality operator

## ◆ operator==() [2/2]

constexpr bool helics::GlobalFederateId::operator== | ( | GlobalFederateId | id | ) | const
| inline constexpr noexcept

equality operator

## ◆ operator>() [1/2]

constexpr bool helics::GlobalFederateId::operator> | ( | GlobalBrokerId | id | ) | const
| inline constexpr noexcept

greater than operator for sorting

## ◆ operator>() [2/2]

constexpr bool helics::GlobalFederateId::operator> | ( | GlobalFederateId | id | ) | const
| inline constexpr noexcept

greater than operator for sorting

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

- GlobalFederateId.hpp