Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::css::DeclarationOrAtRule Struct Reference

Return value of parsers that may return either a declaration or an AtRule, specifically donner::css::parser::DeclarationListParser::Parse. More...

#include "donner/css/Declaration.h"

Public Types

using Type = std::variant<Declaration, AtRule, InvalidRule>
 The value of a DeclarationOrAtRule is either a Declaration, an AtRule, or an InvalidRule, and is stored within this variant.
 

Public Member Functions

 DeclarationOrAtRule (Type &&value)
 Construct a new DeclarationOrAtRule object with any of the Type values.
 
bool operator== (const DeclarationOrAtRule &other) const
 Equality operator.
 

Public Attributes

Type value
 The value of the DeclarationOrAtRule.
 

Friends

std::ostream & operator<< (std::ostream &os, const DeclarationOrAtRule &declOrAt)
 Output a human-readable representation of the declaration or AtRule to a stream.
 

Detailed Description

Return value of parsers that may return either a declaration or an AtRule, specifically donner::css::parser::DeclarationListParser::Parse.

Constructor & Destructor Documentation

◆ DeclarationOrAtRule()

donner::css::DeclarationOrAtRule::DeclarationOrAtRule ( DeclarationOrAtRule::Type && value)

Construct a new DeclarationOrAtRule object with any of the Type values.

Parameters
valueDeclaration value.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const DeclarationOrAtRule & declOrAt )
friend

Output a human-readable representation of the declaration or AtRule to a stream.

Parameters
osOutput stream.
declOrAtDeclarationOrAtRule to output.

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