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

#include <XMLMethodRegistry.h>

Public Member Functions

template<typename ObjectAccessor >
 ObjectReaderEntry (const wxString &tag, ObjectAccessor fn)

Detailed Description

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

Definition at line 82 of file XMLMethodRegistry.h.

Constructor & Destructor Documentation

◆ ObjectReaderEntry()

template<typename Host >
template<typename ObjectAccessor >
XMLMethodRegistry< Host >::ObjectReaderEntry::ObjectReaderEntry ( const wxString &  tag,
ObjectAccessor  fn 

Definition at line 92 of file XMLMethodRegistry.h.

93  {
94  // Remember the function, type-erased
95  Get().Register( tag, [ fn = std::move(fn) ] (void *p) {
96  // CallObjectAccessor will guarantee p is not null
97  return fn( *static_cast<Host *>(p) );
98  } );
99  }

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:
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