EHS/include/ehs/io/socket/ehc/NetSystem.h

48 lines
732 B
C++

#pragma once
#include <ehs/Str.h>
#include <ehs/Array.h>
#include <ehs/Serializer.h>
namespace ehs
{
class EHC;
class NetEnd;
class NetOp;
class NetSystem
{
private:
friend class EHC;
UInt_64 hashId;
Str_8 id;
Array<NetOp*> ops;
public:
virtual ~NetSystem();
NetSystem();
NetSystem(Str_8 id);
NetSystem(NetSystem &&sys) noexcept;
NetSystem(const NetSystem &sys);
NetSystem &operator=(NetSystem &&sys) noexcept;
NetSystem &operator=(const NetSystem &sys);
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);
};
}