DMFlag Class Reference

A game setting that is a part of a group of settings that can be OR'ed logically as a single integer. More...

#include <serverstructs.h>

Public Member Functions

 DMFlag (QString name, unsigned value)
 
bool isValid () const
 Valid objects have value() greater than zero. More...
 
const QString & name () const
 User-displayable name of the DMFlag, ex. "Jump is allowed". More...
 
unsigned value () const
 Bits that represent this flag (usually just a single '1' bit). More...
 

Detailed Description

A game setting that is a part of a group of settings that can be OR'ed logically as a single integer.

DMFlag is basically a setting that is toggleable between enabled/disabled state, and a bunch of DMFlags can be represented as bitflags that can be OR'ed, XOR'ed, and AND'ed together.

DMFlag objects can be put into DMFlagsSection collection.

This structure is safe to copy.

Definition at line 52 of file serverstructs.h.

Member Function Documentation

bool DMFlag::isValid ( ) const

Valid objects have value() greater than zero.

Invalid objects can be treated as 'Null'.

Definition at line 51 of file serverstructs.cpp.

const QString & DMFlag::name ( ) const

User-displayable name of the DMFlag, ex. "Jump is allowed".

Definition at line 56 of file serverstructs.cpp.

unsigned DMFlag::value ( ) const

Bits that represent this flag (usually just a single '1' bit).

Definition at line 61 of file serverstructs.cpp.


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