From 965d34c712d6372c5112e8d9943e48de622a9d5a Mon Sep 17 00:00:00 2001 From: theo3 Date: Thu, 27 Aug 2020 13:20:39 -0700 Subject: non request BaseProcHandle stuff refactoring baseProcHandle.cpp refactoring --- src/KingSystem/ActorSystem/actBaseProcHandle.cpp | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/KingSystem/ActorSystem/actBaseProcHandle.cpp') diff --git a/src/KingSystem/ActorSystem/actBaseProcHandle.cpp b/src/KingSystem/ActorSystem/actBaseProcHandle.cpp index e69de29b..5603b5be 100644 --- a/src/KingSystem/ActorSystem/actBaseProcHandle.cpp +++ b/src/KingSystem/ActorSystem/actBaseProcHandle.cpp @@ -0,0 +1,29 @@ +#include "KingSystem/ActorSystem/actBaseProcHandle.h" + +namespace ksys::act { + +BaseProcHandle::BaseProcHandle() { + mUnit = nullptr; + mFlag = 0; +} + +BaseProcHandle::~BaseProcHandle() { + if (mUnit) { + mUnit->deleteProc(0, this); + mUnit = nullptr; + } + mFlag = 0; +} + +bool BaseProcHandle::procReady() { + return mUnit && mUnit->isReady(); +} + +BaseProc* BaseProcHandle::getProc() { + if (mUnit) + return mUnit->getProc(); + + return nullptr; +} + +} // namespace ksys::act \ No newline at end of file -- cgit v1.2.3