From c112cf54a238afa473e7eb0ea6298e06f4957658 Mon Sep 17 00:00:00 2001 From: kojingeun <diteam.co.kr> Date: 금, 24 11월 2023 14:44:30 +0900 Subject: [PATCH] Merge branch 'feature/#4539_CF_AOI_Review_Log_미출력_현상_개선' into develop --- ReviewHistory/include/akCore/akBit.h | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-) diff --git a/ReviewHistory/include/akCore/akBit.h b/ReviewHistory/include/akCore/akBit.h new file mode 100644 index 0000000..32c6701 --- /dev/null +++ b/ReviewHistory/include/akCore/akBit.h @@ -0,0 +1,57 @@ +#pragma once + + +#include "akCoreLinker.h" + +//namespace akCore +//{ + + class AKCORE_DLLSPEC CakBit + { + public: + CakBit(void); + CakBit(int nBit); + ~CakBit(void); + + + void setBit(int nBit); + void setBitFlag(int nBitIndex, bool bFlag); + + int getBit(); + bool getBitFlag(int nBitIndex); + + + protected: + int m_nBit; + + public: + //비트 체크(on되있으면 true 반환) + static int bitChk(int orig, int target) + { + if(target<32 && (orig&(0x1 << target)))return 1; + else return 0; + } + + //비트 온 + static int bitOn(int orig, int target) + { + if(target<32)return orig|(0x1 << target); + else return orig; + } + + //비트 오프 + static int bitOff(int orig, int target) + { + if(target<32)return orig&(~(0x1 << target)); + else return orig; + } + + //비트 스위치 + static int bitTurn(int orig, int target) + { + if(target<32)return orig^(0x1 << target); + else return orig; + } + }; + +//}; \ No newline at end of file -- Gitblit v1.9.3