A group of DMFlag objects that can be safely OR'ed together to form a meaningful value. More...
#include <serverstructs.h>
Public Member Functions | |
DMFlagsSection (const QString &name) | |
void | add (const DMFlag &flag) |
Append a new DMFlag to this section. More... | |
unsigned | combineValues () const |
Logical OR of all DMFlag::value() results in this collection. More... | |
int | count () const |
Number of DMFlag objects inside the collection. More... | |
bool | isEmpty () const |
const QString & | name () const |
User-displayable name of this section, ex. "Compatibility flags". More... | |
DMFlagsSection & | operator<< (const DMFlag &flag) |
Stream input operator that appends DMFlag to the collection, same as add(). More... | |
const DMFlag & | operator[] (int index) const |
Access DMFlag at specific index with '[]' operator. More... | |
DMFlag & | operator[] (int index) |
A group of DMFlag objects that can be safely OR'ed together to form a meaningful value.
This object is safe to copy.
Definition at line 86 of file serverstructs.h.
void DMFlagsSection::add | ( | const DMFlag & | flag | ) |
Append a new DMFlag to this section.
Note that conflicting DMFlags will still be accepted here, as no check are performed. Objects added here affect results of combineValues().
Definition at line 90 of file serverstructs.cpp.
unsigned DMFlagsSection::combineValues | ( | ) | const |
Logical OR of all DMFlag::value() results in this collection.
Invalid DMFlag objects, if present in the collection, do not affect the output of this operation.
Definition at line 95 of file serverstructs.cpp.
int DMFlagsSection::count | ( | ) | const |
Number of DMFlag objects inside the collection.
Definition at line 105 of file serverstructs.cpp.
const QString & DMFlagsSection::name | ( | ) | const |
User-displayable name of this section, ex. "Compatibility flags".
Definition at line 115 of file serverstructs.cpp.
|
inline |
Stream input operator that appends DMFlag to the collection, same as add().
Definition at line 128 of file serverstructs.h.
const DMFlag & DMFlagsSection::operator[] | ( | int | index | ) | const |
Access DMFlag at specific index with '[]' operator.
Definition at line 120 of file serverstructs.cpp.