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

An enumeration that represents the current state the network client is in. More...

#include <CeresEngine/Network/NetworkClient.hpp>

Inheritance diagram for CeresEngine::NetworkClientState:
CeresEngine::StructEnum< NetworkClientState >

Public Types

enum  : UnderlyingType {
  Disconnected , Connecting , Connected , Disconnecting ,
  Error
}
 
using RawType = decltype(raw)
 
- Public Types inherited from CeresEngine::StructEnum< NetworkClientState >
using UnderlyingType = UInt32
 
using Self = NetworkClientState
 

Public Member Functions

constexpr NetworkClientState ()=default
 
constexpr NetworkClientState (RawType raw)
 
constexpr NetworkClientState (UnderlyingType raw)
 
StringView toString () const noexcept
 Gets a string representation of NetworkClientState.
 
- Public Member Functions inherited from CeresEngine::StructEnum< NetworkClientState >
 operator UnderlyingType () const noexcept
 Converts the enum into it's underlying type.
 
void toString (std::ostream &stream) const noexcept
 Writes a string representation of the ShaderType to the given stream.
 

Static Public Member Functions

static Optional< NetworkClientStatefromString (StringView string) noexcept
 Creates a new NetworkClientState from a string representation.
 
- Static Public Member Functions inherited from CeresEngine::StructEnum< NetworkClientState >
static Self fromRawUnderlying (UnderlyingType underlying) noexcept
 Creates a new Self from it's underlying numeric representation.
 

Public Attributes

enum CeresEngine::NetworkClientState:: { ... }  raw
 

Detailed Description

An enumeration that represents the current state the network client is in.

Member Typedef Documentation

◆ RawType

Member Enumeration Documentation

◆ anonymous enum

Enumerator
Disconnected 
Connecting 
Connected 
Disconnecting 
Error 

Constructor & Destructor Documentation

◆ NetworkClientState() [1/3]

constexpr CeresEngine::NetworkClientState::NetworkClientState ( )
constexprdefault

◆ NetworkClientState() [2/3]

constexpr CeresEngine::NetworkClientState::NetworkClientState ( RawType  raw)
inlineconstexpr

◆ NetworkClientState() [3/3]

constexpr CeresEngine::NetworkClientState::NetworkClientState ( UnderlyingType  raw)
inlineexplicitconstexpr

Member Function Documentation

◆ fromString()

static Optional< NetworkClientState > CeresEngine::NetworkClientState::fromString ( StringView  string)
staticnoexcept

Creates a new NetworkClientState from a string representation.

If the string value is invalid, an empty optional is returned.

◆ toString()

StringView CeresEngine::NetworkClientState::toString ( ) const
noexcept

Gets a string representation of NetworkClientState.

Member Data Documentation

◆ []

enum { ... } CeresEngine::NetworkClientState::raw

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