|
TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
|
Root class for serializable objects used in RPC communications. More...
#include <tec_serialize.hpp>
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 NetData & | store (NetData &s) const =0 |
| Serialize this object into a binary stream. | |
| virtual NetData & | load (NetData &s)=0 |
| Deserialize this object from a binary stream. | |
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.
|
inlineexplicit |
Constructs an NdRoot instance with the specified RPC identifier.
This explicit constructor initializes the object with a given RPC ID.
| _id | The RPC identifier to assign to this object. |
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.