CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::NetworkClientID Struct Reference

#include <CeresEngine/Network/NetworkClient.hpp>

Public Types

using RawT = UInt64
 The raw type.
 

Public Member Functions

constexpr NetworkClientID () noexcept=default
 Creates a new empty NetworkClientID.
 
constexpr NetworkClientID (const NetworkClientID &other) noexcept=default
 Creates a new network client ID by copying the contents of another.
 
constexpr NetworkClientIDoperator= (const NetworkClientID &other) noexcept=default
 Assings the network client ID contents by copying the contents of another.
 
constexpr NetworkClientID (const UInt64 raw) noexcept
 Creates a new network client ID from it's index and version.
 

Public Attributes

UInt64 raw = 0
 The raw network client ID.
 

Friends

constexpr bool operator== (const NetworkClientID &a, const NetworkClientID &b) noexcept
 Compares two client IDs for equality.
 
constexpr bool operator!= (const NetworkClientID &a, const NetworkClientID &b) noexcept
 Compares two client IDs for inequality.
 
constexpr bool operator< (const NetworkClientID &a, const NetworkClientID &b) noexcept
 Compares two client IDs for <.
 
constexpr bool operator<= (const NetworkClientID &a, const NetworkClientID &b) noexcept
 Compares two client IDs for <=.
 
constexpr bool operator> (const NetworkClientID &a, const NetworkClientID &b) noexcept
 Compares two client IDs for >.
 
constexpr bool operator>= (const NetworkClientID &a, const NetworkClientID &b) noexcept
 Compares two client IDs for >=.
 
std::ostream & operator<< (std::ostream &os, const NetworkClientID &clientID)
 Prints a string representation of the Client ID.
 

Member Typedef Documentation

◆ RawT

Constructor & Destructor Documentation

◆ NetworkClientID() [1/3]

constexpr CeresEngine::NetworkClientID::NetworkClientID ( )
inlineconstexprdefaultnoexcept

Creates a new empty NetworkClientID.

◆ NetworkClientID() [2/3]

constexpr CeresEngine::NetworkClientID::NetworkClientID ( const NetworkClientID other)
constexprdefaultnoexcept

Creates a new network client ID by copying the contents of another.

Parameters
otherThe instance to copy from

◆ NetworkClientID() [3/3]

constexpr CeresEngine::NetworkClientID::NetworkClientID ( const UInt64  raw)
inlineexplicitconstexprnoexcept

Creates a new network client ID from it's index and version.

Parameters
rawThe raw network client ID value

Member Function Documentation

◆ operator=()

constexpr NetworkClientID & CeresEngine::NetworkClientID::operator= ( const NetworkClientID other)
constexprdefaultnoexcept

Assings the network client ID contents by copying the contents of another.

Parameters
otherThe instance to copy from
Returns
This

Friends And Related Symbol Documentation

◆ operator!=

Compares two client IDs for inequality.

Two client IDs are considered equal iff their index and version match.

Parameters
aThe left hand side operator argument
bThe right hand side operator argument
Returns
True if the two IDs can be considered equal

◆ operator<

Compares two client IDs for <.

Parameters
aThe left hand side operator argument
bThe right hand side operator argument
Returns
True if the two IDs can be considered <

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const NetworkClientID clientID 
)
friend

Prints a string representation of the Client ID.

Parameters
osThe output stream to print to
clientIDThe client ID to be printed
Returns
The given os

◆ operator<=

Compares two client IDs for <=.

Parameters
aThe left hand side operator argument
bThe right hand side operator argument
Returns
True if the two IDs can be considered <=

◆ operator==

Compares two client IDs for equality.

Two client IDs are considered equal iff their index and version match.

Parameters
aThe left hand side operator argument
bThe right hand side operator argument
Returns
True if the two IDs can be considered equal

◆ operator>

Compares two client IDs for >.

Parameters
aThe left hand side operator argument
bThe right hand side operator argument
Returns
True if the two IDs can be considered >

◆ operator>=

Compares two client IDs for >=.

Parameters
aThe left hand side operator argument
bThe right hand side operator argument
Returns
True if the two IDs can be considered >=

Member Data Documentation

◆ raw

UInt64 CeresEngine::NetworkClientID::raw = 0

The raw network client ID.


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