00001
00002 Copyright (c) 2001, Lee Patterson & Ant Works Software
00003 http://ssobjects.sourceforge.net
00004
00005 created : 07/30/2000 12:00pm
00006 filename : flags.h
00007 author : Lee Patterson (lee@antws.com)
00008
00009 purpose : Object used to toggle and test bits in a flag value
00010 *********************************************************************/
00011
00012 #ifndef FLAGS_H
00013 #define FLAGS_H
00014
00015 #include "ssobjects.h"
00016
00017 namespace ssobjects
00018 {
00019
00020 class Flags
00021 {
00022 public:
00023 enum
00024 {
00025 F_NONE=0,
00026 F_ALL=0xFFFFFFFF
00027 };
00028
00029 protected:
00030 unsigned32 m_nFlags;
00031
00032 public:
00033 Flags(unsigned32 nInitiallySet=0);
00034 virtual ~Flags();
00035 unsigned32 toggle(unsigned32 nFlagsSetting,unsigned32 nFlagsResetting=F_NONE);
00036 bool isSet(unsigned32 nCheckFlags);
00037 unsigned32 get() {return m_nFlags;}
00038 };
00039
00040 };
00041
00042 #endif
00043