From 6e0a9dd083fae3138418444eb783e99509bb522b Mon Sep 17 00:00:00 2001 From: LYW <leeyeanwoo@diteam.co.kr> Date: 금, 09 7월 2021 12:02:49 +0900 Subject: [PATCH] Merge branch 'feature/#3486_CF_AOI_Review_Review_History_프로그램_테스트_및_적용' into feature/#3495_CF_AOI_Review(QD,_Blue)_GlassLoading_시_다운_현상_조치 --- 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