Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::TagDecorator< Generator > Class Template Referencefinal

A decorator that decorates a string (log line) with a unique tag. More...

#include <Taggable.hpp>

Inheritance diagram for util::TagDecorator< Generator >:
Collaboration diagram for util::TagDecorator< Generator >:

Public Member Functions

 TagDecorator (ParentType parent=std::nullopt)
 Create a new tag decorator with an optional parent.
 
void decorate (std::ostream &os) const override
 Implementation of the decoration. Chaining tags when parent is available.
 
- Public Member Functions inherited from util::BaseTagDecorator

Detailed Description

template<typename Generator>
class util::TagDecorator< Generator >

A decorator that decorates a string (log line) with a unique tag.

Template Parameters
GeneratorThe strategy used to generate the tag.

Constructor & Destructor Documentation

◆ TagDecorator()

template<typename Generator >
util::TagDecorator< Generator >::TagDecorator ( ParentType parent = std::nullopt)
inlineexplicit

Create a new tag decorator with an optional parent.

If the parent is specified it will be streamed out as a chain when this decorator will decorate an ostream.

Note that if parent is specified it is your responsibility that the decorator referred to by parent outlives this decorator.

Parameters
parentAn optional parent tag decorator

Member Function Documentation

◆ decorate()

template<typename Generator >
void util::TagDecorator< Generator >::decorate ( std::ostream & os) const
inlineoverridevirtual

Implementation of the decoration. Chaining tags when parent is available.

Parameters
osThe stream to output into

Implements util::BaseTagDecorator.


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