Audacity  3.0.3
Public Member Functions | List of all members
XMLMethodRegistry< Host >::WriterEntry Struct Reference

Typically statically constructed. More...

#include <XMLMethodRegistry.h>

Public Member Functions

template<typename Writer >
 WriterEntry (Writer fn)

Detailed Description

template<typename Host>
struct XMLMethodRegistry< Host >::WriterEntry

Typically statically constructed.

Definition at line 150 of file XMLMethodRegistry.h.

Constructor & Destructor Documentation

◆ WriterEntry()

template<typename Host >
template<typename Writer >
XMLMethodRegistry< Host >::WriterEntry::WriterEntry ( Writer  fn)

Definition at line 162 of file XMLMethodRegistry.h.

163  {
164  // Remember the function, type-erased
165  Get().Register(
166  [ fn = std::move(fn) ] ( const void *p, XMLWriter &writer ) {
167  // CallObjectAccessor will guarantee p is not null
168  return fn( *static_cast<const Host *>(p), writer );
169  } );
170  }

References fn, XMLMethodRegistry< Host >::Get(), and XMLMethodRegistryBase::Register().

Here is the call graph for this function:

The documentation for this struct was generated from the following file:
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:23
static const auto fn
Definition: WaveformView.cpp:1108
static XMLMethodRegistry & Get()
Get the unique instance.
void Register(const wxString &tag, TypeErasedObjectAccessor accessor)
Definition: XMLMethodRegistry.cpp:19