TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
Loading...
Searching...
No Matches
tec::NdRoot Struct Reference

Root class for serializable objects used in RPC communications. More...

#include <tec_serialize.hpp>

Inheritance diagram for tec::NdRoot:
tec::Serializable

Public Member Functions

 NdRoot (rpcid_t _id)
 Constructs an NdRoot instance with the specified RPC identifier.
 
constexpr rpcid_t id () const
 Retrieves the RPC identifier.
 
- Public Member Functions inherited from tec::Serializable
virtual NetDatastore (NetData &s) const =0
 Serialize this object into a binary stream.
 
virtual NetDataload (NetData &s)=0
 Deserialize this object from a binary stream.
 

Detailed Description

Root class for serializable objects used in RPC communications.

This struct serves as the base class for all serializable objects involved in RPC (Remote Procedure Call) communications. It provides a unique identifier for each RPC instance, ensuring proper tracking, dispatching and serialization.

Note
This class inherits from Serializable to enable serialization capabilities.

Constructor & Destructor Documentation

◆ NdRoot()

tec::NdRoot::NdRoot ( rpcid_t  _id)
inlineexplicit

Constructs an NdRoot instance with the specified RPC identifier.

This explicit constructor initializes the object with a given RPC ID.

Parameters
_idThe RPC identifier to assign to this object.

Member Function Documentation

◆ id()

constexpr rpcid_t tec::NdRoot::id ( ) const
inlineconstexpr

Retrieves the RPC identifier.

This constexpr member function returns the stored RPC ID. It is marked as constexpr to allow evaluation at compile-time when possible.

Returns
The RPC identifier.

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