|
Page Speed Optimization Libraries
1.13.35.1
|
Represents a set of values – implemented via a bitset. More...
#include "enum_set.h"
Public Member Functions | |
| bool | IsSet (EnumType value) const |
| bool | Insert (EnumType value) |
| Inserts a new value, returning true if a change was made. | |
| void | insert (EnumType value) |
| bool | Erase (EnumType value) |
| Returns true if a change was made. | |
| bool | Merge (const EnumSet &src) |
| Merges src into this, returning whether this resulted in a change. More... | |
| bool | MergeInverted (const EnumSet &src) |
| void | EraseSet (const EnumSet &src) |
| void | SetAll () |
| Sets all the entries to true. | |
| void | clear () |
| Standard STL-like methods. | |
| size_t | size () const |
| bool | empty () const |
| bool | operator== (const EnumSet &that) const |
| This overload is required for use in EXPECT_EQ in tests. | |
Represents a set of values – implemented via a bitset.
|
inline |
Inserts a value; no return value.
|
inline |
Merges src into this, returning whether this resulted in a change.
We save the current version of the set in order to see whether the merge resulted in a change. Note that copying and comparing the bits is very cheap; probably cheaper than calling count().
|
inline |
Merges the entries not set in src into this, returning whether this resulted in a change.
1.8.6