LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::Errata Class Reference

#include <Errata.h>

Collaboration diagram for swoc::Errata:
Collaboration graph

Classes

class  Annotation
 
struct  AutoText
 Used to indicate automatically generated annotation text.
 
struct  Data
 Implementation class. More...
 
struct  Severity
 
class  Sink
 
struct  SinkWrapper
 Convenience wrapper class to enable using functions directly for sinks. More...
 

Public Types

using code_type = std::error_code
 Type for message code.
 
using severity_type = uint8_t
 Underlying type for Severity.
 
using iterator = Container::iterator
 
using const_iterator = Container::const_iterator
 
using SinkHandler = std::function<void(Errata const &)>
 Register a function as a sink.
 

Public Member Functions

 Errata ()=default
 Default constructor - empty errata, very fast.
 
 Errata (self_type const &that)=delete
 No copy construction.
 
 Errata (self_type &&that) noexcept
 Move constructor.
 
self_typeoperator= (self_type const &that)=delete
 
self_typeoperator= (self_type &&that)
 Move assignment.
 
 ~Errata ()
 Destructor.
 
 Errata (code_type const &ec)
 
 Errata (code_type const &ec, AutoText)
 
 Errata (Severity severity)
 
 Errata (Severity severity, AutoText)
 
 Errata (code_type const &ec, Severity severity)
 
 Errata (code_type const &ec, Severity severity, AutoText auto_text)
 
 Errata (code_type const &code, Severity severity, std::string_view const &text)
 
 Errata (Severity severity, std::string_view const &text)
 
 Errata (code_type const &code, std::string_view const &text)
 
 Errata (std::string_view const &text)
 
template<typename... Args>
 Errata (code_type const &code, Severity severity, std::string_view fmt, Args &&...args)
 
template<typename... Args>
 Errata (code_type const &type, std::string_view fmt, Args &&...args)
 
template<typename... Args>
 Errata (Severity severity, std::string_view fmt, Args &&...args)
 
template<typename... Args>
 Errata (std::string_view fmt, Args &&...args)
 
self_typenote (std::string_view text)
 
self_typenote (Severity severity, std::string_view text)
 
self_typenote (Severity severity)
 
self_typenote (code_type const &ec)
 
self_typenote (code_type const &code, Severity severity)
 
self_typenote_s (std::optional< Severity > severity, std::string_view text)
 
template<typename... Args>
self_typenote (std::string_view fmt, Args &&...args)
 
template<typename... Args>
self_typenote_v (std::string_view fmt, std::tuple< Args... > const &args)
 
template<typename... Args>
self_typenote (Severity severity, std::string_view fmt, Args &&...args)
 
template<typename... Args>
self_typenote_v (Severity severity, std::string_view fmt, std::tuple< Args... > const &args)
 
template<typename... Args>
self_typenote_sv (std::optional< Severity > severity, std::string_view fmt, std::tuple< Args... > const &args)
 
self_typenote (self_type const &that)
 
self_typenote (self_type &&that)
 
self_typeclear ()
 
self_typesink ()
 
 operator bool () const
 
bool operator! () const
 
bool is_ok () const
 
bool has_severity () const
 
Severity severity () const
 
self_typeassign (Severity severity)
 
self_typeupdate (Severity severity)
 
code_type const & code () const
 The code for the top message.
 
self_typeassign (code_type code)
 Set the code for this.
 
size_t length () const
 Number of messages in the errata.
 
bool empty () const
 
iterator begin ()
 Reference to top item on the stack.
 
const_iterator begin () const
 Reference to top item on the stack.
 
iterator end ()
 Reference one past bottom item on the stack.
 
const_iterator end () const
 Reference one past bottom item on the stack.
 
const Annotationfront () const
 
const Annotationback () const
 
TextView annotation_glue_text () const
 
self_typeassign_annotation_glue_text (TextView text, bool final_glue_p=false)
 
TextView annotation_severity_glue_text () const
 
self_typeassign_annotation_severity_glue_text (TextView text)
 
TextView severity_glue_text () const
 
self_typeassign_severity_glue_text (TextView text)
 
TextView indent_text () const
 
self_typeassign_indent_text (TextView text)
 
std::ostream & write (std::ostream &out) const
 
template<typename... Args>
Erratanote_sv (std::optional< Severity > severity, std::string_view fmt, std::tuple< Args... > const &args)
 
template<typename... Args>
Erratanote_v (std::string_view fmt, std::tuple< Args... > const &args)
 
template<typename... Args>
Erratanote_v (Severity severity, std::string_view fmt, std::tuple< Args... > const &args)
 
template<typename... Args>
Erratanote (std::string_view fmt, Args &&...args)
 
template<typename... Args>
Erratanote (Severity severity, std::string_view fmt, Args &&...args)
 

Static Public Member Functions

static void register_sink (Sink::Handle const &s)
 Register a sink for discarded erratum.
 
static void register_sink (SinkHandler const &f)
 Register a sink function for abandonded erratum.
 
static void register_sink (SinkHandler &&f)
 Register a sink function for abandonded erratum.
 

Static Public Attributes

static const code_type DEFAULT_CODE
 Code used if not specified.
 
static Severity DEFAULT_SEVERITY
 Severity reported if severity not set.
 
static Severity FAILURE_SEVERITY
 Severity level at which the instance is a failure of some sort.
 
static Severity FILTER_SEVERITY
 
static TextView AUTOTEXT_SEVERITY = "{}"
 Format for auto generated annotation with severity.
 
static TextView AUTOTEXT_CODE = "{}"
 Format for auto generated annotation with error code.
 
static TextView AUTOTEXT_SEVERITY_CODE = "{}: {}"
 Format for auto generate annotation with error code and severity.
 
static MemSpan< TextView const > SEVERITY_NAMES {Severity_Names.data(), Severity_Names.size()}
 
static constexpr struct swoc::Errata::AutoText AUTO
 
static TextView DEFAULT_ANNOTATION_GLUE_TEXT = "\n"
 Default glue value (a newline) for text rendering.
 
static TextView DEFAULT_SEVERITY_GLUE_TEXT = ": "
 Default glue text for use after the severity name.
 
static TextView DEFAULT_INDENT_TEXT = " "
 

Protected Types

using self_type = Errata
 
using Container = IntrusiveDList<Annotation::Linkage>
 

Protected Member Functions

Datadata ()
 
MemSpan< char > alloc (size_t n)
 
self_typenote_localized (std::string_view const &text, std::optional< Severity > severity=std::optional< Severity >{})
 Add Annotation with already localized text.
 

Protected Attributes

Data_data = nullptr
 

Static Protected Attributes

static Annotation const NIL_NOTE
 Used for returns when no data is present.
 

Friends

struct Data
 
class Item
 
std::ostream & operator<< (std::ostream &os, self_type const &err)
 
BufferWriterbwformat (BufferWriter &bw, bwf::Spec const &spec, Errata const &errata)
 

Detailed Description

Class to hold a stack of error messages (the "errata"). This is a smart handle class, which wraps the actual data and can therefore be treated a value type with cheap copy semantics. Default construction is very cheap.

Definition at line 59 of file Errata.h.

Member Typedef Documentation

◆ code_type

using swoc::Errata::code_type = std::error_code

Type for message code.

Definition at line 61 of file Errata.h.

◆ const_iterator

using swoc::Errata::const_iterator = Container::const_iterator

Definition at line 553 of file Errata.h.

◆ Container

using swoc::Errata::Container = IntrusiveDList<Annotation::Linkage>
protected

Storage, for list of messages. Internally the vector is accessed backwards, in order to make it LIFO.

Definition at line 165 of file Errata.h.

◆ iterator

using swoc::Errata::iterator = Container::iterator

Definition at line 552 of file Errata.h.

◆ self_type

using swoc::Errata::self_type = Errata
protected

Self reference type.

Definition at line 162 of file Errata.h.

◆ severity_type

using swoc::Errata::severity_type = uint8_t

Underlying type for Severity.

Definition at line 62 of file Errata.h.

◆ SinkHandler

using swoc::Errata::SinkHandler = std::function<void(Errata const &)>

Register a function as a sink.

Definition at line 646 of file Errata.h.

Constructor & Destructor Documentation

◆ Errata() [1/15]

swoc::Errata::Errata ( self_type && that)
inlinenoexcept

Move constructor.

Definition at line 1030 of file Errata.h.

◆ ~Errata()

swoc::Errata::~Errata ( )

Destructor.

Definition at line 49 of file Errata.cc.

◆ Errata() [2/15]

swoc::Errata::Errata ( code_type const & ec)
inlineexplicit

Construct with an error code.

Parameters
ecError code

No annotation is created.

Definition at line 1034 of file Errata.h.

◆ Errata() [3/15]

swoc::Errata::Errata ( code_type const & ec,
AutoText  )
inlineexplicit

Construct with an error code and generated annotation.

Parameters
ecError code

An annotation is created using the format AUTOTEXT_CODE with ec as the argument.

See also
AUTOTEXT_CODE

Definition at line 1048 of file Errata.h.

◆ Errata() [4/15]

swoc::Errata::Errata ( Severity severity)
inlineexplicit

Construct with a severity.

Parameters
severitySeverity.

No annotation is created.

Definition at line 1038 of file Errata.h.

◆ Errata() [5/15]

swoc::Errata::Errata ( Severity severity,
AutoText  )
inlineexplicit

Construct with a severity.

Parameters
severitySeverity.

An annotation is created using the format AUTO_TEXT_SEVERITY with severity as the argument.

See also
AUTOTEXT_SEVERITY

Definition at line 1053 of file Errata.h.

◆ Errata() [6/15]

swoc::Errata::Errata ( code_type const & ec,
Severity severity )
inline

Construct with error code and severity.

Parameters
ecError code.
severitySeverity.

No annotation is created.

Definition at line 1042 of file Errata.h.

◆ Errata() [7/15]

swoc::Errata::Errata ( code_type const & ec,
Severity severity,
AutoText auto_text )
inlineexplicit

Construct with a severity and error code.

Parameters
severitySeverity.
ecError code.
auto_textIf present, generate an annotation.

The annotation uses the format AUTOTEXT_SEVERITY_CODE with arguments severity , ec

See also
AUTOTEXT_SEVERITY_CODE

Definition at line 1058 of file Errata.h.

◆ Errata() [8/15]

swoc::Errata::Errata ( code_type const & code,
Severity severity,
std::string_view const & text )
inline

Constructor.

Parameters
codeError code.
severitySeverity.
textAnnotation text.

Constructs with error code and severity. An annotation with text.

Definition at line 1062 of file Errata.h.

◆ Errata() [9/15]

swoc::Errata::Errata ( Severity severity,
std::string_view const & text )
inline

Constructor.

Parameters
severitySeverity.
textAnnotation text.

Constructs with severity and an annotation with text.

Definition at line 1068 of file Errata.h.

◆ Errata() [10/15]

swoc::Errata::Errata ( code_type const & code,
std::string_view const & text )
inline

Constructor.

Parameters
codeError code.
text

Construct with error code and an annotation with text.

Definition at line 1067 of file Errata.h.

◆ Errata() [11/15]

swoc::Errata::Errata ( std::string_view const & text)
inlineexplicit

Constructor.

Parameters
textAnnotation text.

Definition at line 1066 of file Errata.h.

◆ Errata() [12/15]

template<typename... Args>
swoc::Errata::Errata ( code_type const & code,
Severity severity,
std::string_view fmt,
Args &&... args )

Constructor.

Template Parameters
ArgsFormat argument types.
Parameters
codeError code.
severitySeverity.
fmtAnnotation format.
argsAnnotation format arguments.

Cosntructs with error code and severity and an formatted annotation.

Definition at line 1071 of file Errata.h.

◆ Errata() [13/15]

template<typename... Args>
swoc::Errata::Errata ( code_type const & type,
std::string_view fmt,
Args &&... args )

Definition at line 1076 of file Errata.h.

◆ Errata() [14/15]

template<typename... Args>
swoc::Errata::Errata ( Severity severity,
std::string_view fmt,
Args &&... args )

Definition at line 1079 of file Errata.h.

◆ Errata() [15/15]

template<typename... Args>
swoc::Errata::Errata ( std::string_view fmt,
Args &&... args )
explicit

Definition at line 1082 of file Errata.h.

Member Function Documentation

◆ alloc()

MemSpan< char > swoc::Errata::alloc ( size_t n)
protected

Allocate a span of memory.

Parameters
nNumber of bytes to allocate.
Returns
A span of the allocated memory.

Definition at line 74 of file Errata.cc.

◆ annotation_glue_text()

TextView swoc::Errata::annotation_glue_text ( ) const
inline
Returns
The annotation glue text for this.

Definition at line 1263 of file Errata.h.

◆ annotation_severity_glue_text()

TextView swoc::Errata::annotation_severity_glue_text ( ) const
inline
Returns
Glue text for the annotation severity.

Definition at line 1275 of file Errata.h.

◆ assign() [1/2]

auto swoc::Errata::assign ( code_type code)
inline

Set the code for this.

Definition at line 1122 of file Errata.h.

◆ assign() [2/2]

auto swoc::Errata::assign ( Severity severity)
inline

Set the severity.

Parameters
severitySeverity value.
Returns
this
See also
update

Definition at line 1137 of file Errata.h.

◆ assign_annotation_glue_text()

auto swoc::Errata::assign_annotation_glue_text ( TextView text,
bool final_glue_p = false )
inline

Assign text to use between annotations while printing.

Parameters
textGlue text.
final_glue_pAdd glue after last annotation?
Returns
this

Definition at line 1268 of file Errata.h.

◆ assign_annotation_severity_glue_text()

auto swoc::Errata::assign_annotation_severity_glue_text ( TextView text)
inline

Assign text to use after the severity for an annoation while printing.

Parameters
textGlue text.
Returns
this

Definition at line 1280 of file Errata.h.

◆ assign_indent_text()

auto swoc::Errata::assign_indent_text ( TextView text)
inline

Assign the text used for indentation.

Parameters
textText for each level of indentation.
Returns
this.

Definition at line 1302 of file Errata.h.

◆ assign_severity_glue_text()

auto swoc::Errata::assign_severity_glue_text ( TextView text)
inline

Assign text to use after the severity while printing.

Parameters
textGlue text.
Returns
this

Definition at line 1291 of file Errata.h.

◆ back()

const Errata::Annotation & swoc::Errata::back ( ) const
inline

lask annotation.

Returns
The last annotation.

It is an error to call this on an empty instance.

Definition at line 1158 of file Errata.h.

◆ begin() [1/2]

Errata::iterator swoc::Errata::begin ( )
inline

Reference to top item on the stack.

Definition at line 1243 of file Errata.h.

◆ begin() [2/2]

Errata::const_iterator swoc::Errata::begin ( ) const
inline

Reference to top item on the stack.

Definition at line 1248 of file Errata.h.

◆ clear()

Errata & swoc::Errata::clear ( )
inline

Reset to default state.

Returns
this

All messages are discarded and the state is returned to success.

Definition at line 1085 of file Errata.h.

◆ code()

auto swoc::Errata::code ( ) const
inline

The code for the top message.

Definition at line 1117 of file Errata.h.

◆ data()

Errata::Data * swoc::Errata::data ( )
protected

Force data existence.

Returns
A pointer to the data.

Definition at line 65 of file Errata.cc.

◆ empty()

bool swoc::Errata::empty ( ) const
inline

Check for no messages

Returns
true if there is one or messages.

Definition at line 1112 of file Errata.h.

◆ end() [1/2]

Errata::iterator swoc::Errata::end ( )
inline

Reference one past bottom item on the stack.

Definition at line 1253 of file Errata.h.

◆ end() [2/2]

Errata::const_iterator swoc::Errata::end ( ) const
inline

Reference one past bottom item on the stack.

Definition at line 1258 of file Errata.h.

◆ front()

const Errata::Annotation & swoc::Errata::front ( ) const
inline

First annotation.

Returns
The first annotation.

It is an error to call this on an empty instance.

Definition at line 1153 of file Errata.h.

◆ has_severity()

bool swoc::Errata::has_severity ( ) const
inline
Returns
If there is top level severity.

Definition at line 1128 of file Errata.h.

◆ indent_text()

TextView swoc::Errata::indent_text ( ) const
inline
Returns
The text used for each level of indentation.

Definition at line 1297 of file Errata.h.

◆ is_ok()

bool swoc::Errata::is_ok ( ) const
inline

Test errata for no failure condition.

Equivalent to operator bool but easier to invoke.

Returns
true if no message has a severity of FAILURE_SEVERITY or greater, false if at least one such message is in the stack.

Definition at line 1148 of file Errata.h.

◆ length()

size_t swoc::Errata::length ( ) const
inline

Number of messages in the errata.

Definition at line 1143 of file Errata.h.

◆ note() [1/11]

Errata & swoc::Errata::note ( code_type const & code,
Severity severity )
inline

Append an Annotation to the top based on error code code with severity.

Parameters
severityLocal severity.
codeError code.
Returns
*this

The annotation uses the format AUTOTEXT_SEVERITY_CODE with the argument severity.

See also
AUTOTEXT_SEVERITY_CODE

Definition at line 1190 of file Errata.h.

◆ note() [2/11]

Errata & swoc::Errata::note ( code_type const & ec)
inline

Add an Annotation to the top based on error code code.

Parameters
codeError code.
Returns
*this

The annotation uses the format AUTOTEXT_CODE with the argument ec.

See also
AUTOTEXT_CODE
Note
ec is used only for formatting, the Errata error code is unchanged.

Definition at line 1185 of file Errata.h.

◆ note() [3/11]

Errata & swoc::Errata::note ( self_type && that)
inline

Copy messages from that to this, then clear that.

Parameters
thatSource object from which to copy.
Returns
*this

The code and severity of that are discarded.

Definition at line 1163 of file Errata.h.

◆ note() [4/11]

Errata & swoc::Errata::note ( self_type const & that)

Copy messages from that to this.

Parameters
thatSource object from which to copy.
Returns
*this

The code and severity of that are discarded.

Definition at line 100 of file Errata.cc.

◆ note() [5/11]

Errata & swoc::Errata::note ( Severity severity)
inline

Add an Annotation to the top with text and local severity.

Parameters
severityThe local severity.
Returns
*this

The annotation uses the format AUTOTEXT_SEVERITY with the argument severity.

See also
AUTOTEXT_SEVERITY

Definition at line 1180 of file Errata.h.

◆ note() [6/11]

template<typename... Args>
self_type & swoc::Errata::note ( Severity severity,
std::string_view fmt,
Args &&... args )

Append an Annotation.

Parameters
severityLocal severity.
fmtFormat string (BufferWriter style).
argsArguments for values in fmt.
Returns
A reference to this object.

The severity is updated to severity if the latter is more severe.

◆ note() [7/11]

template<typename... Args>
Errata & swoc::Errata::note ( Severity severity,
std::string_view fmt,
Args &&... args )

Definition at line 1238 of file Errata.h.

◆ note() [8/11]

Errata & swoc::Errata::note ( Severity severity,
std::string_view text )
inline

Add an Annotation to the top with text and local severity.

Parameters
severityThe local severity.
textText of the message.
Returns
*this

text is localized to this and does not need to be persistent. The severity is updated to severity if the latter is more severe.

Definition at line 1175 of file Errata.h.

◆ note() [9/11]

template<typename... Args>
self_type & swoc::Errata::note ( std::string_view fmt,
Args &&... args )

Append an Annotation.

Parameters
fmtFormat string (BufferWriter style).
argsArguments for values in fmt.
Returns
A reference to this object.

◆ note() [10/11]

template<typename... Args>
Errata & swoc::Errata::note ( std::string_view fmt,
Args &&... args )

Definition at line 1232 of file Errata.h.

◆ note() [11/11]

Errata & swoc::Errata::note ( std::string_view text)
inline

Add an Annotation to the top with text.

Parameters
textText of the message.
Returns
*this

The error code is set to the default. text is localized to this and does not need to be persistent.

Definition at line 1170 of file Errata.h.

◆ note_localized()

Errata & swoc::Errata::note_localized ( std::string_view const & text,
std::optional< Severity > severity = std::optional<Severity>{} )
protected

Add Annotation with already localized text.

Definition at line 92 of file Errata.cc.

◆ note_s()

Errata & swoc::Errata::note_s ( std::optional< Severity > severity,
std::string_view text )

Append an Annotation to the top based with optional severity.

Parameters
severityLocal severity.
textAnnotation text.
Returns
*this

This is a unified interface for other fixed text note methods which all forward to this method. If severity does not have a value then the annotation is never filtered.

The severity is updated to severity if the latter is set and more severe.

See also
FILTER_SEVERITY

Definition at line 79 of file Errata.cc.

◆ note_sv() [1/2]

template<typename... Args>
self_type & swoc::Errata::note_sv ( std::optional< Severity > severity,
std::string_view fmt,
std::tuple< Args... > const & args )

Append an Annotation.

Parameters
severityLocal severity.
fmtFormat string (BufferWriter style).
argsArguments for values in fmt.
Returns
A reference to this object.

The severity is updated to severity if the latter is set and more severe.

This the effective implementation method for all variadic styles of the note method.

◆ note_sv() [2/2]

template<typename... Args>
Errata & swoc::Errata::note_sv ( std::optional< Severity > severity,
std::string_view fmt,
std::tuple< Args... > const & args )

Definition at line 1196 of file Errata.h.

◆ note_v() [1/4]

template<typename... Args>
self_type & swoc::Errata::note_v ( Severity severity,
std::string_view fmt,
std::tuple< Args... > const & args )

Append an Annotation.

Parameters
severityLocal severity.
fmtFormat string (BufferWriter style).
argsArguments for values in fmt.
Returns
A reference to this object.

This is intended for use by external "helper" methods that pass their own arguments to this using forward_as_tuple.

The severity is updated to severity if the latter is more severe.

◆ note_v() [2/4]

template<typename... Args>
Errata & swoc::Errata::note_v ( Severity severity,
std::string_view fmt,
std::tuple< Args... > const & args )

Definition at line 1226 of file Errata.h.

◆ note_v() [3/4]

template<typename... Args>
self_type & swoc::Errata::note_v ( std::string_view fmt,
std::tuple< Args... > const & args )

Append an Annotation.

Parameters
fmtFormat string (BufferWriter style).
argsArguments for values in fmt.
Returns
A reference to this object.

This is intended for use by external "helper" methods that pass their own arguments to this using forward_as_tuple.

◆ note_v() [4/4]

template<typename... Args>
Errata & swoc::Errata::note_v ( std::string_view fmt,
std::tuple< Args... > const & args )

Definition at line 1220 of file Errata.h.

◆ operator bool()

swoc::Errata::operator bool ( ) const
inlineexplicit

Test status.

Equivalent to is_ok but more convenient for use in control statements.

Returns
false at least one message has a severity of FAILURE_SEVERITY or greater, true if not.

Definition at line 1102 of file Errata.h.

◆ operator!()

bool swoc::Errata::operator! ( ) const
inline

Test status.

Equivalent to !is_ok() but potentially more convenient.

Returns
true at least one message has a severity of FAILURE_SEVERITY or greater, false if not.

Definition at line 1107 of file Errata.h.

◆ operator=()

auto swoc::Errata::operator= ( self_type && that)
inline

Move assignment.

Definition at line 1094 of file Errata.h.

◆ register_sink() [1/3]

void swoc::Errata::register_sink ( Sink::Handle const & s)
static

Register a sink for discarded erratum.

Definition at line 122 of file Errata.cc.

◆ register_sink() [2/3]

static void swoc::Errata::register_sink ( SinkHandler && f)
inlinestatic

Register a sink function for abandonded erratum.

Definition at line 666 of file Errata.h.

◆ register_sink() [3/3]

static void swoc::Errata::register_sink ( SinkHandler const & f)
inlinestatic

Register a sink function for abandonded erratum.

Definition at line 660 of file Errata.h.

◆ severity()

auto swoc::Errata::severity ( ) const
inline
Returns
Top level severity.

Definition at line 1132 of file Errata.h.

◆ severity_glue_text()

TextView swoc::Errata::severity_glue_text ( ) const
inline
Returns
The severity glue text for this.

Definition at line 1286 of file Errata.h.

◆ sink()

Errata & swoc::Errata::sink ( )

Log and clear this.

Returns
this

The content is sent to the defined Sink instances then reset to the default state.

See also
register_sink
clear

Definition at line 54 of file Errata.cc.

◆ update()

auto swoc::Errata::update ( Severity severity)

Set the severity.

Parameters
severityMinimum severity
Returns
this

This sets the internal severity to the maximum of severity and the current severity.

See also
assign

Definition at line 114 of file Errata.cc.

◆ write()

std::ostream & swoc::Errata::write ( std::ostream & out) const

Simple formatted output.

Definition at line 166 of file Errata.cc.

Friends And Related Symbol Documentation

◆ bwformat

BufferWriter & bwformat ( BufferWriter & bw,
bwf::Spec const & spec,
Errata const & errata )
friend

Definition at line 137 of file Errata.cc.

◆ Data

friend struct Data
friend

Definition at line 698 of file Errata.h.

◆ Item

friend class Item
friend

Definition at line 699 of file Errata.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
self_type const & err )
friend

Definition at line 173 of file Errata.cc.

Member Data Documentation

◆ _data

Data* swoc::Errata::_data = nullptr
protected

Implementation instance.

Definition at line 679 of file Errata.h.

◆ AUTOTEXT_CODE

TextView swoc::Errata::AUTOTEXT_CODE = "{}"
inlinestatic

Format for auto generated annotation with error code.

Definition at line 90 of file Errata.h.

◆ AUTOTEXT_SEVERITY

TextView swoc::Errata::AUTOTEXT_SEVERITY = "{}"
inlinestatic

Format for auto generated annotation with severity.

Definition at line 89 of file Errata.h.

◆ AUTOTEXT_SEVERITY_CODE

TextView swoc::Errata::AUTOTEXT_SEVERITY_CODE = "{}: {}"
inlinestatic

Format for auto generate annotation with error code and severity.

Definition at line 91 of file Errata.h.

◆ DEFAULT_ANNOTATION_GLUE_TEXT

TextView swoc::Errata::DEFAULT_ANNOTATION_GLUE_TEXT = "\n"
inlinestatic

Default glue value (a newline) for text rendering.

Definition at line 478 of file Errata.h.

◆ DEFAULT_CODE

const code_type swoc::Errata::DEFAULT_CODE
inlinestatic

Code used if not specified.

Definition at line 79 of file Errata.h.

◆ DEFAULT_INDENT_TEXT

TextView swoc::Errata::DEFAULT_INDENT_TEXT = " "
inlinestatic

Definition at line 482 of file Errata.h.

◆ DEFAULT_SEVERITY

Errata::Severity swoc::Errata::DEFAULT_SEVERITY
static

Severity reported if severity not set.

Definition at line 81 of file Errata.h.

◆ DEFAULT_SEVERITY_GLUE_TEXT

TextView swoc::Errata::DEFAULT_SEVERITY_GLUE_TEXT = ": "
inlinestatic

Default glue text for use after the severity name.

Definition at line 480 of file Errata.h.

◆ FAILURE_SEVERITY

Errata::Severity swoc::Errata::FAILURE_SEVERITY
static

Severity level at which the instance is a failure of some sort.

Definition at line 83 of file Errata.h.

◆ FILTER_SEVERITY

Errata::Severity swoc::Errata::FILTER_SEVERITY
static

Minimum severity level for an Annotation. If an Annotation is added with an explicit Severity that is smaller the Annotation is discarded instead of added. This defaults to zero and no filtering is done unless it is overwritten.

Definition at line 87 of file Errata.h.

◆ NIL_NOTE

Annotation const swoc::Errata::NIL_NOTE
staticprotected

Used for returns when no data is present.

Definition at line 696 of file Errata.h.

◆ SEVERITY_NAMES

swoc::MemSpan< TextView const > swoc::Errata::SEVERITY_NAMES {Severity_Names.data(), Severity_Names.size()}
static

Mapping of severity to string. Values larger than the span size will be rendered as numbers. Defaults to an empty span, meaning all severities will be printed as integers.

Definition at line 96 of file Errata.h.


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