Options that define the behaviour of the (de)serialize() methods. More...
#include <Valuable/Archive.hpp>
Public Types | |
| enum | Options { LAYER_DEFAULT = 1 << 0, LAYER_STYLE = 1 << 1, LAYER_USER = 1 << 2, LAYER_STYLE_IMPORTANT = 1 << 3, DEFAULTS = LAYER_USER, ONLY_CHANGED = LAYER_STYLE | LAYER_USER | LAYER_STYLE_IMPORTANT, EVERYTHING = LAYER_DEFAULT | LAYER_STYLE | LAYER_USER | LAYER_STYLE_IMPORTANT } |
| Serialization bitflags. More... | |
Public Member Functions | |
| bool | checkFlags (Options flag) |
| Check if given flag is enabled. More... | |
| SerializationOptions (unsigned int options=DEFAULTS) | |
| Construct an options object with given flags. | |
| void | setOptions (Options flags) |
| Set the options for serialization. | |
Protected Attributes | |
| unsigned int | m_options |
| Actual bitmask of flags. | |
Options that define the behaviour of the (de)serialize() methods.
Serialization bitflags.
The actual value that is serialized is from the layer with highest priority that is included in serialization with LAYER_-flags. The default is LAYER_USER, meaning that only manually set values will be serialized. If an attribute has a value set only from a CSS file, that whole attribute is ignored.
| Enumerator | |
|---|---|
| LAYER_STYLE |
Serialize values from Valuable::Attribute::DEFAULT layer. |
| LAYER_USER |
Serialize values from Valuable::Attribute::STYLE layer. |
| LAYER_STYLE_IMPORTANT |
Serialize values from Valuable::Attribute::USER layer. |
| DEFAULTS |
Serialize values from Valuable::Attribute::STYLE_IMPORTANT layer. Normal behaviour, serialize manually set values |
| ONLY_CHANGED |
Serialize only values that are different from the original values. |
| EVERYTHING |
Serialize all values. |
|
inline |
Check if given flag is enabled.
| flag | Flag to test |