DMFlagsSection Class Reference

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...
 
DMFlagsSectionoperator<< (const DMFlag &flag)
 Stream input operator that appends DMFlag to the collection, same as add(). More...
 
const DMFlagoperator[] (int index) const
 Access DMFlag at specific index with '[]' operator. More...
 
DMFlagoperator[] (int index)
 

Detailed Description

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.

Member Function Documentation

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.

DMFlagsSection& DMFlagsSection::operator<< ( const DMFlag flag)
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.


The documentation for this class was generated from the following files: