|
|
Donner
C++20 SVG rendering library
|
A CSS simple block, such as a rule block or a parenthesized expression. More...
#include "donner/css/ComponentValue.h"
Public Member Functions | |
| SimpleBlock (TokenIndex associatedToken, const FileOffset &sourceOffset) | |
| Construct a new SimpleBlock object with an opening token and an empty list of component values. | |
| bool | operator== (const SimpleBlock &other) const |
| Equality operator. | |
Public Attributes | |
| TokenIndex | associatedToken |
| The token that starts the simple block. | |
| std::vector< ComponentValue > | values |
| List of component values inside the simple block. | |
| FileOffset | sourceOffset |
| Offset of the opening token in the source string. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const SimpleBlock &block) |
| Output a human-readable representation of the simple block to a stream. | |
A CSS simple block, such as a rule block or a parenthesized expression.
A SimpleBlock may start with either '{', '(' or '[', and ends when the matching closing token is found.
For example, the following is a valid simple block: { color: red; }, and so is this within a selector: [href^="https://"].
|
explicit |
Construct a new SimpleBlock object with an opening token and an empty list of component values.
To supply component values, modify the values vector after construction.
| associatedToken | The token that starts the simple block. |
| sourceOffset | Offset of the opening token in the source string. |
|
friend |
Output a human-readable representation of the simple block to a stream.
| os | Output stream. |
| block | Simple block to output. |
| TokenIndex donner::css::SimpleBlock::associatedToken |
The token that starts the simple block.
This is either '{', '[' or '(', which corresponds to Token::CurlyBracket, Token::SquareBracket, and Token::Parenthesis respectively.