EHS
NetSys.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/Str.h"
4#include "ehs/Array.h"
5#include "ehs/Serializer.h"
6
7namespace ehs
8{
9 class NetChannel;
10 class NetEnd;
11 class NetOp;
12
13 class NetSys
14 {
15 private:
16 friend class NetChannel;
17 friend class NetServerCh;
18 friend class NetClientCh;
19
20 UInt_64 id;
21 Str_8 name;
22 Array<NetOp*> ops;
23
24 public:
25 virtual ~NetSys();
26
27 NetSys();
28
29 NetSys(Str_8 name);
30
31 NetSys(NetSys &&sys) noexcept;
32
33 NetSys(const NetSys &sys);
34
35 NetSys &operator=(NetSys &&sys) noexcept;
36
37 NetSys &operator=(const NetSys &sys);
38
39 UInt_64 GetId() const;
40
41 Str_8 GetName() const;
42
43 bool HasOperation(UInt_64 id) const;
44
45 bool AddOperation(NetOp *op);
46
47 private:
48 void Execute(NetChannel *channel, NetEnd *issuer, UInt_64 opId, Serializer<UInt_64> &payload);
49 };
50}
Definition: Array.h:16
Definition: NetChannel.h:15
Definition: NetClientCh.h:11
Definition: NetEnd.h:16
Definition: NetOp.h:13
Definition: NetServerCh.h:10
Definition: NetSys.h:14
virtual ~NetSys()
Definition: NetSys.cpp:9
bool HasOperation(UInt_64 id) const
Definition: NetSys.cpp:74
NetSys()
Definition: NetSys.cpp:17
Str_8 GetName() const
Definition: NetSys.cpp:69
NetSys & operator=(NetSys &&sys) noexcept
Definition: NetSys.cpp:38
bool AddOperation(NetOp *op)
Definition: NetSys.cpp:83
UInt_64 GetId() const
Definition: NetSys.cpp:64
Definition: Anchor.h:6