A thread safe class representing a set of flags.
A thread safe class representing a set of flags. The flags are protected by GMonitor, which is attempted to be locked whenever somebody accesses the flags. One can modify the class contents using one of two functions: test_and_modify() and wait_and_modify(). Both of them provide atomic operation of testing (first) and modification (second). The flags remain locked between the moment of testing and modification, which guarantees, that their state cannot be changed in between of these operations.
GSafeFlags& operator=(const GSafeFlags & f)
operator long(void) const
GSafeFlags& operator|=(long mask)
GSafeFlags& operator&=(long mask)
bool test_and_modify(long set_mask, long clr_mask, long set_mask1, long clr_mask1)
void wait_and_modify(long set_mask, long clr_mask, long set_mask1, long clr_mask1)
void wait_for_flags(long set_mask, long clr_mask=0) const
void modify(long set_mask, long clr_mask)
Alphabetic index HTML hierarchy of classes or Java