From 89925fe820c8d6eb5ef877c7e62c40f258721c10 Mon Sep 17 00:00:00 2001 From: Arron Nelson Date: Thu, 30 Jan 2025 13:01:01 -0800 Subject: [PATCH] Renamed member variables and parameters. --- include/ehs/io/socket/ehc/NetChannel.h | 8 +++--- include/ehs/io/socket/ehc/NetOp.h | 10 ++++---- include/ehs/io/socket/ehc/NetSys.h | 14 +++++------ src/io/socket/ehc/NetChannel.cpp | 20 +++++++-------- src/io/socket/ehc/NetOp.cpp | 26 ++++++++++---------- src/io/socket/ehc/NetSys.cpp | 34 +++++++++++++------------- 6 files changed, 56 insertions(+), 56 deletions(-) diff --git a/include/ehs/io/socket/ehc/NetChannel.h b/include/ehs/io/socket/ehc/NetChannel.h index 239f85a..2a66f97 100644 --- a/include/ehs/io/socket/ehc/NetChannel.h +++ b/include/ehs/io/socket/ehc/NetChannel.h @@ -83,12 +83,12 @@ namespace ehs virtual void Poll(const float &delta); protected: - bool HasSystem(UInt_64 sysHashId) const; + bool HasSystem(UInt_64 sysId) const; - bool HasSystem(const Str_8& sysId) const; + bool HasSystem(const Str_8& sysName) const; - NetSys* GetSystem(UInt_64 sysHashId) const; + NetSys* GetSystem(UInt_64 sysId) const; - NetSys* GetSystem(const Str_8& sysId) const; + NetSys* GetSystem(const Str_8& sysName) const; }; } \ No newline at end of file diff --git a/include/ehs/io/socket/ehc/NetOp.h b/include/ehs/io/socket/ehc/NetOp.h index 6302c34..403811c 100644 --- a/include/ehs/io/socket/ehc/NetOp.h +++ b/include/ehs/io/socket/ehc/NetOp.h @@ -14,15 +14,15 @@ namespace ehs private: friend class NetSys; - UInt_64 hashId; - Str_8 id; + UInt_64 id; + Str_8 name; public: virtual ~NetOp() = default; NetOp(); - NetOp(Str_8 id); + NetOp(Str_8 name); NetOp(NetOp &&op) noexcept; @@ -32,9 +32,9 @@ namespace ehs NetOp &operator=(const NetOp &op); - Str_8 GetId() const; + UInt_64 GetId() const; - UInt_64 GetHashId() const; + Str_8 GetName() const; private: virtual void Execute(NetChannel *channel, NetEnd *issuer, NetSys *sys, Serializer &payload); diff --git a/include/ehs/io/socket/ehc/NetSys.h b/include/ehs/io/socket/ehc/NetSys.h index d61d38c..445b092 100644 --- a/include/ehs/io/socket/ehc/NetSys.h +++ b/include/ehs/io/socket/ehc/NetSys.h @@ -17,8 +17,8 @@ namespace ehs friend class NetServerCh; friend class NetClientCh; - UInt_64 hashId; - Str_8 id; + UInt_64 id; + Str_8 name; Array ops; public: @@ -26,7 +26,7 @@ namespace ehs NetSys(); - NetSys(Str_8 id); + NetSys(Str_8 name); NetSys(NetSys &&sys) noexcept; @@ -36,15 +36,15 @@ namespace ehs NetSys &operator=(const NetSys &sys); - Str_8 GetId() const; + UInt_64 GetId() const; - UInt_64 GetHashId() const; + Str_8 GetName() const; - bool HasOperation(UInt_64 hashId) const; + bool HasOperation(UInt_64 id) const; bool AddOperation(NetOp *op); private: - void Execute(NetChannel *channel, NetEnd *endpoint, UInt_64 hashId, Serializer &payload); + void Execute(NetChannel *channel, NetEnd *issuer, UInt_64 opId, Serializer &payload); }; } \ No newline at end of file diff --git a/src/io/socket/ehc/NetChannel.cpp b/src/io/socket/ehc/NetChannel.cpp index 7a4e0f5..c2ebac4 100644 --- a/src/io/socket/ehc/NetChannel.cpp +++ b/src/io/socket/ehc/NetChannel.cpp @@ -138,10 +138,10 @@ namespace ehs bool NetChannel::AddSystem(NetSys *sys) { - if (sys->GetHashId() == internalSys) + if (sys->GetId() == internalSys) return false; - if (HasSystem(sys->GetHashId())) + if (HasSystem(sys->GetId())) return false; systems.Push(sys); @@ -163,31 +163,31 @@ namespace ehs { } - bool NetChannel::HasSystem(const UInt_64 sysHashId) const + bool NetChannel::HasSystem(const UInt_64 sysId) const { for (UInt_64 i = 0; i < systems.Size(); ++i) - if (systems[i]->GetHashId() == sysHashId) + if (systems[i]->GetId() == sysId) return true; return false; } - bool NetChannel::HasSystem(const Str_8& sysId) const + bool NetChannel::HasSystem(const Str_8& sysName) const { - return HasSystem(sysId.Hash_64()); + return HasSystem(sysName.Hash_64()); } - NetSys* NetChannel::GetSystem(const UInt_64 sysHashId) const + NetSys* NetChannel::GetSystem(const UInt_64 sysId) const { for (UInt_64 i = 0; i < systems.Size(); ++i) - if (systems[i]->GetHashId() == sysHashId) + if (systems[i]->GetId() == sysId) return systems[i]; return nullptr; } - NetSys* NetChannel::GetSystem(const Str_8& sysId) const + NetSys* NetChannel::GetSystem(const Str_8& sysName) const { - return GetSystem(sysId.Hash_64()); + return GetSystem(sysName.Hash_64()); } } \ No newline at end of file diff --git a/src/io/socket/ehc/NetOp.cpp b/src/io/socket/ehc/NetOp.cpp index 2551084..17d3437 100644 --- a/src/io/socket/ehc/NetOp.cpp +++ b/src/io/socket/ehc/NetOp.cpp @@ -5,23 +5,23 @@ namespace ehs { NetOp::NetOp() - : hashId(0) + : id(0) { } - NetOp::NetOp(Str_8 id) - : hashId(id.Hash_64()), id((Str_8 &&)id) + NetOp::NetOp(Str_8 name) + : id(name.Hash_64()), name((Str_8 &&)name) { } NetOp::NetOp(NetOp&& op) noexcept - : hashId(op.hashId), id((Str_8 &&)op.id) + : id(op.id), name((Str_8 &&)op.name) { - op.hashId = 0; + op.id = 0; } NetOp::NetOp(const NetOp &op) - : hashId(op.hashId), id(op.id) + : id(op.id), name(op.name) { } @@ -30,10 +30,10 @@ namespace ehs if (this == &op) return *this; - hashId = op.hashId; - id = (Str_8 &&)op.id; + id = op.id; + name = (Str_8 &&)op.name; - op.hashId = 0; + op.id = 0; return *this; } @@ -43,20 +43,20 @@ namespace ehs if (this == &op) return *this; - hashId = op.hashId; id = op.id; + name = op.name; return *this; } - Str_8 NetOp::GetId() const + UInt_64 NetOp::GetId() const { return id; } - UInt_64 NetOp::GetHashId() const + Str_8 NetOp::GetName() const { - return hashId; + return name; } void NetOp::Execute(NetChannel *channel, NetEnd *endpoint, NetSys *sys, Serializer &payload) diff --git a/src/io/socket/ehc/NetSys.cpp b/src/io/socket/ehc/NetSys.cpp index 0879982..4f27edb 100644 --- a/src/io/socket/ehc/NetSys.cpp +++ b/src/io/socket/ehc/NetSys.cpp @@ -15,23 +15,23 @@ namespace ehs } NetSys::NetSys() - : hashId(0) + : id(0) { } - NetSys::NetSys(Str_8 id) - : hashId(id.Hash_64()), id((Str_8&&)id) + NetSys::NetSys(Str_8 name) + : id(name.Hash_64()), name((Str_8&&)name) { } NetSys::NetSys(NetSys&& sys) noexcept - : hashId(sys.hashId), id((Str_8&&)sys.id), ops((Array&&)sys.ops) + : id(sys.id), name((Str_8&&)sys.name), ops((Array&&)sys.ops) { - sys.hashId = 0; + sys.id = 0; } NetSys::NetSys(const NetSys& sys) - : hashId(sys.hashId), id(sys.id) + : id(sys.id), name(sys.name) { } @@ -40,11 +40,11 @@ namespace ehs if (this == &sys) return *this; - hashId = sys.hashId; - id = (Str_8&&)sys.id; + id = sys.id; + name = (Str_8&&)sys.name; ops = (Array&&)sys.ops; - sys.hashId = 0; + sys.id = 0; return *this; } @@ -54,27 +54,27 @@ namespace ehs if (this == &sys) return *this; - hashId = sys.hashId; id = sys.id; + name = sys.name; ops = Array(); return *this; } - Str_8 NetSys::GetId() const + UInt_64 NetSys::GetId() const { return id; } - UInt_64 NetSys::GetHashId() const + Str_8 NetSys::GetName() const { - return hashId; + return name; } - bool NetSys::HasOperation(const UInt_64 hashId) const + bool NetSys::HasOperation(const UInt_64 id) const { for (UInt_64 i = 0; i < ops.Size(); ++i) - if (ops[i]->GetHashId() == hashId) + if (ops[i]->GetId() == id) return true; return false; @@ -82,7 +82,7 @@ namespace ehs bool NetSys::AddOperation(NetOp* op) { - if (HasOperation(op->GetHashId())) + if (HasOperation(op->GetId())) return false; ops.Push(op); @@ -94,7 +94,7 @@ namespace ehs { for (UInt_64 i = 0; i < ops.Size(); ++i) { - if (ops[i]->GetHashId() == hashId) + if (ops[i]->GetId() == hashId) { ops[i]->Execute(channel, endpoint, this, payload); return;