LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::bwf::NameBinding Class Referenceabstract

#include <bwf_base.h>

Inheritance diagram for swoc::bwf::NameBinding:
Inheritance graph
Collaboration diagram for swoc::bwf::NameBinding:
Collaboration graph

Public Member Functions

virtual ~NameBinding ()
 Force virtual destructor.
 
virtual BufferWriteroperator() (BufferWriter &w, Spec const &spec) const =0
 

Static Protected Member Functions

static BufferWritererr_invalid_name (BufferWriter &w, Spec const &spec)
 — Names / Generators —
 

Detailed Description

Base class for implementing a name binding functor.

This expected to be inherited by other classes that provide the name binding service. It does a few small but handy things.

  • Force a virtual destructor.
  • Force the implementation of the binding method by declaring it as a pure virtual.
  • Provide a standard "missing name" method.

Definition at line 252 of file bwf_base.h.

Member Function Documentation

◆ err_invalid_name()

BufferWriter & swoc::bwf::NameBinding::err_invalid_name ( BufferWriter & w,
Spec const & spec )
inlinestaticprotected

— Names / Generators —

Standardized missing name method.

Parameters
wThe destination buffer.
specFormat specifier, used to determine the invalid name.
Returns
w

Definition at line 547 of file bwf_base.h.

◆ operator()()

virtual BufferWriter & swoc::bwf::NameBinding::operator() ( BufferWriter & w,
Spec const & spec ) const
pure virtual

Generate output text for name on the output w using the format specifier spec. This must match the BoundNameSignature type.

Parameters
wOutput stream.
specParsed format specifier.
Note
The tag name can be found in spec._name.
Returns
w

Implemented in swoc::bwf::ContextNames< T >::Binding, swoc::bwf::ExternalNames, and swoc::bwf::NilBinding.


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