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

#include <CeresEngine/Network/NetworkEntity.hpp>

Public Member Functions

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

Public Attributes

UInt64 raw = 0
 The raw network entity ID.
 

Friends

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

Constructor & Destructor Documentation

◆ NetworkEntityID() [1/3]

constexpr CeresEngine::NetworkEntityID::NetworkEntityID ( )
inlineconstexprdefaultnoexcept

Creates a new empty NetworkEntityID.

◆ NetworkEntityID() [2/3]

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

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

Parameters
otherThe instance to copy from

◆ NetworkEntityID() [3/3]

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

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

Parameters
rawThe raw network entity ID value

Member Function Documentation

◆ operator=()

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

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

Parameters
otherThe instance to copy from
Returns
This

Friends And Related Symbol Documentation

◆ operator!=

Compares two entity IDs for inequality.

Two entity 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 entity 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 NetworkEntityID id 
)
friend

Prints a string representation of the Entity ID.

Parameters
osThe output stream to print to
idThe entity ID to be printed
Returns
The given os

◆ operator<=

Compares two entity 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 entity IDs for equality.

Two entity 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 entity 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 entity 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::NetworkEntityID::raw = 0

The raw network entity ID.


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