2024-10-06 20:08:22 -07:00
|
|
|
#pragma once
|
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
#include "ehs/Str.h"
|
|
|
|
#include "ehs/Array.h"
|
|
|
|
#include "ehs/Serializer.h"
|
2024-10-06 20:08:22 -07:00
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
|
|
|
class EHC;
|
|
|
|
class NetEnd;
|
|
|
|
class NetOp;
|
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
class NetSys
|
2024-10-06 20:08:22 -07:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
friend class EHC;
|
|
|
|
|
|
|
|
UInt_64 hashId;
|
|
|
|
Str_8 id;
|
|
|
|
Array<NetOp*> ops;
|
|
|
|
|
|
|
|
public:
|
2024-10-06 22:54:29 -07:00
|
|
|
virtual ~NetSys();
|
2024-10-06 20:08:22 -07:00
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
NetSys();
|
2024-10-06 20:08:22 -07:00
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
NetSys(Str_8 id);
|
2024-10-06 20:08:22 -07:00
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
NetSys(NetSys &&sys) noexcept;
|
2024-10-06 20:08:22 -07:00
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
NetSys(const NetSys &sys);
|
2024-10-06 20:08:22 -07:00
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
NetSys &operator=(NetSys &&sys) noexcept;
|
2024-10-06 20:08:22 -07:00
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
NetSys &operator=(const NetSys &sys);
|
2024-10-06 20:08:22 -07:00
|
|
|
|
|
|
|
Str_8 GetId() const;
|
|
|
|
|
|
|
|
UInt_64 GetHashId() const;
|
|
|
|
|
|
|
|
bool HasOperation(UInt_64 hashId) const;
|
|
|
|
|
|
|
|
bool AddOperation(NetOp *op);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Execute(EHC *ehc, NetEnd *endpoint, UInt_64 hashId, Serializer<UInt_64> &payload);
|
|
|
|
};
|
|
|
|
}
|