Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp Namespace Reference

Namespaces

namespace  client
 R-Type client namespace.
 
namespace  config
 File : SpriteMapConfig.hpp License: MIT Author : GitHub Copilot Date : 18/01/2026.
 
namespace  details
 
namespace  ecs
 File : RenderSystem.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 14/12/2025.
 
namespace  log
 
namespace  net
 File : IEventPublisher.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 11/12/2025.
 
namespace  server
 File : GameManager.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias.nosp@m.-jos.nosp@m.ue.ha.nosp@m.jjar.nosp@m.-llau.nosp@m.quen.nosp@m.@epit.nosp@m.ech..nosp@m.eu Date : 11/12/2025.
 
namespace  sys
 
namespace  thread
 

Classes

class  Error
 Comprehensive error object with severity and retry tracking. More...
 
struct  Vec2
 A 2-dimensional vector. More...
 
struct  Vec3
 A 3-dimensional vector. More...
 
struct  Vec4
 A 4-dimensional vector. More...
 

Concepts

concept  Numeric
 A concept that checks if a type is numeric (integral or floating-point).
 

Typedefs

template<Numeric T, std::size_t N>
using Vec = std::conditional_t< N==2, Vec2< T >, std::conditional_t< N==3, Vec3< T >, std::conditional_t< N==4, Vec4< T >, details::VecN< T, N > > > >
 Smart alias that selects the optimized struct based on N.
 
using Vec2f = Vec2< float >
 
using Vec2d = Vec2< double >
 
using Vec2i = Vec2< int >
 
using Vec2u = Vec2< unsigned int >
 
using Vec3f = Vec3< float >
 
using Vec3d = Vec3< double >
 
using Vec3i = Vec3< int >
 
using Vec3u = Vec3< unsigned int >
 
using Vec4f = Vec4< float >
 
using Vec4d = Vec4< double >
 
using Vec4i = Vec4< int >
 
using Vec4u = Vec4< unsigned int >
 

Enumerations

enum class  ErrorCode : std::uint16_t {
  Success = 0 , Unknown = 1 , InvalidParameter , InternalRuntimeError ,
  ConnectionFailed = 100 , Disconnected , Timeout , PayloadError ,
  FileNotFound = 200 , LibraryLoadFailed , SymbolNotFound , InvalidFormat ,
  ComponentMissing = 300 , RegistryFull , EntityInvalid
}
 Enumeration of all possible error codes in the RType engine. More...
 

Functions

constexpr std::string_view toString (ErrorCode e) noexcept
 Convert an ErrorCode to its string representation.
 
std::error_code make_error_code (ErrorCode e) noexcept
 Create a std::error_code from an ErrorCode.
 
const std::error_category & rtype_category (void) noexcept
 Get the RType error category for std::error_code integration.
 

Typedef Documentation

◆ Vec

template<Numeric T, std::size_t N>
using rtp::Vec = typedef std::conditional_t<N == 2, Vec2<T>, std::conditional_t<N == 3, Vec3<T>, std::conditional_t<N == 4, Vec4<T>, details::VecN<T, N> >> >

Smart alias that selects the optimized struct based on N.

Definition at line 52 of file Vec.hpp.

◆ Vec2d

using rtp::Vec2d = typedef Vec2<double>

Definition at line 81 of file Vec2.hpp.

◆ Vec2f

using rtp::Vec2f = typedef Vec2<float>

Definition at line 80 of file Vec2.hpp.

◆ Vec2i

using rtp::Vec2i = typedef Vec2<int>

Definition at line 82 of file Vec2.hpp.

◆ Vec2u

using rtp::Vec2u = typedef Vec2<unsigned int>

Definition at line 83 of file Vec2.hpp.

◆ Vec3d

using rtp::Vec3d = typedef Vec3<double>

Definition at line 89 of file Vec3.hpp.

◆ Vec3f

using rtp::Vec3f = typedef Vec3<float>

Definition at line 88 of file Vec3.hpp.

◆ Vec3i

using rtp::Vec3i = typedef Vec3<int>

Definition at line 90 of file Vec3.hpp.

◆ Vec3u

using rtp::Vec3u = typedef Vec3<unsigned int>

Definition at line 91 of file Vec3.hpp.

◆ Vec4d

using rtp::Vec4d = typedef Vec4<double>

Definition at line 83 of file Vec4.hpp.

◆ Vec4f

using rtp::Vec4f = typedef Vec4<float>

Definition at line 82 of file Vec4.hpp.

◆ Vec4i

using rtp::Vec4i = typedef Vec4<int>

Definition at line 84 of file Vec4.hpp.

◆ Vec4u

using rtp::Vec4u = typedef Vec4<unsigned int>

Definition at line 85 of file Vec4.hpp.

Enumeration Type Documentation

◆ ErrorCode

enum class rtp::ErrorCode : std::uint16_t
strong

Enumeration of all possible error codes in the RType engine.

Error codes are organized into categories:

  • Core (1-99): General application errors
  • Network (100-199): Network-related errors
  • IO (200-299): File and library loading errors
  • ECS (300-399): Entity Component System errors
Enumerator
Success 
Unknown 

Unknown or unspecified error.

InvalidParameter 

Invalid function parameter provided.

InternalRuntimeError 

Internal runtime error.

ConnectionFailed 

Failed to establish network connection.

Disconnected 

Connection was disconnected.

Timeout 

Network operation timed out.

PayloadError 

Error in network payload data.

FileNotFound 

Requested file does not exist.

LibraryLoadFailed 

Failed to load dynamic library.

SymbolNotFound 

Symbol not found in dynamic library.

InvalidFormat 

Invalid file or data format.

ComponentMissing 

Requested component not found on entity.

RegistryFull 

Entity registry has reached maximum capacity.

EntityInvalid 

Entity identifier is invalid or stale.

Definition at line 68 of file Error.hpp.

Function Documentation

◆ make_error_code()

std::error_code rtp::make_error_code ( ErrorCode  e)
noexcept

Create a std::error_code from an ErrorCode.

Parameters
eThe error code to convert
Returns
A std::error_code with the RType error category

Definition at line 80 of file Error.cpp.

References rtype_category().

◆ rtype_category()

const std::error_category & rtp::rtype_category ( void  )
noexcept

Get the RType error category for std::error_code integration.

Returns
Reference to the RType error category singleton

Definition at line 74 of file Error.cpp.

Referenced by make_error_code().

◆ toString()

constexpr std::string_view rtp::toString ( ErrorCode  e)
constexprnoexcept

Convert an ErrorCode to its string representation.

Parameters
eThe error code to convert
Returns
String view containing the error code name

Referenced by std::formatter< rtp::Error >::format(), std::formatter< rtp::ErrorCode >::format(), and rtp::server::Room::setPlayerType().