00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TA_FLAGS_H
00013 #define TA_FLAGS_H
00014
00015 #ifndef TA_COMMON_H
00016 #include "Common.h"
00017 #endif // TA_COMMON_H
00018
00019 namespace TA
00020 {
00021
00022 template <class Type>
00023 inline void SetFlag(Type& m_nFlags, u32 nBit, bool bValue)
00024 {
00025 if (bValue)
00026 m_nFlags |= (Type)(nBit);
00027 else
00028 m_nFlags &= (Type)(~nBit);
00029 }
00030
00031 template <class Type>
00032 inline bool GetFlag(Type m_nFlags, u32 nBit)
00033 {
00034 return (m_nFlags & (Type)(nBit)) != 0;
00035 }
00036
00037 }
00038
00039 #endif // TA_FLAGS_H
© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.