Audacity 3.2.0
|
Namespaces | |
namespace | detail |
Classes | |
struct | AcceptableItemType |
struct | ActualItem |
Find the real item type (following chains of indirections) More... | |
struct | ActualItem< detail::ComputedItem< C, T > > |
struct | ActualItem< detail::IndirectItem< T > > |
struct | AllTypes |
struct | DefaultTraits |
struct | EmptyContext |
struct | GroupItem |
Has variadic and range constructors that check types. More... | |
struct | OrderingHint |
struct | OrderingPreferenceInitializer |
struct | Placement |
class | RegisteredItem |
Generates classes whose instances register items at construction. More... | |
struct | SingleItem |
Common abstract base class for items that are not groups. More... | |
struct | VisitorFunctions |
Typedefs | |
using | Path = std::vector< Identifier > |
using | BaseItemTypes = TypeList::List< detail::IndirectItemBase, detail::ComputedItemBase, struct SingleItem, struct detail::GroupItemBase > |
template<typename Item > | |
using | AcceptableBaseItem = TypeList::HasBaseIn< Item, BaseItemTypes > |
template<typename RegistryTraits > | |
using | AllTypes_t = typename AllTypes< RegistryTraits >::type |
template<typename T > | |
using | ActualItem_t = typename ActualItem< T >::type |
template<typename RegistryTraits , typename Item > | |
using | AcceptableType = AcceptableItemType< Item, AllTypes_t< RegistryTraits > > |
Functions | |
template<typename Item > | |
std::unique_ptr< detail::IndirectItem< Item > > | Indirect (const std::shared_ptr< Item > &ptr) |
A convenience function. More... | |
template<typename RegistryTraits , typename Item > | |
void | RegisterItem (GroupItem< RegistryTraits > ®istry, const Placement &placement, std::unique_ptr< Item > pItem) |
template<typename RegistryTraits , typename Visitors > | |
void | Visit (const Visitors &visitors, const GroupItem< RegistryTraits > *pTopItem, const GroupItem< RegistryTraits > *pRegistry={}, typename RegistryTraits::ComputedItemContextType &computedItemContext=RegistryTraits::ComputedItemContextType::Instance) |
template<typename RegistryTraits > | |
void | VisitWithFunctions (const VisitorFunctions< RegistryTraits > &visitors, const GroupItem< RegistryTraits > *pTopItem, const GroupItem< RegistryTraits > *pRegistry={}, typename RegistryTraits::ComputedItemContextType &computedItemContext=RegistryTraits::ComputedItemContextType::Instance) |
Variables | |
template<typename Item > | |
constexpr auto | AcceptableBaseItem_v |
template<typename RegistryTraits > | |
constexpr auto | AcceptableTraits_v |
template<typename RegistryTraits , typename Item > | |
constexpr auto | AcceptableType_v |
constexpr auto | NoOp = [](auto&, auto&){} |
Supply this when one member of a visitor function triple isn't needed. More... | |
using Registry::AcceptableBaseItem = typedef TypeList::HasBaseIn<Item, BaseItemTypes> |
Definition at line 136 of file Registry.h.
using Registry::AcceptableType = typedef AcceptableItemType<Item, AllTypes_t<RegistryTraits> > |
Definition at line 329 of file Registry.h.
using Registry::ActualItem_t = typedef typename ActualItem<T>::type |
Definition at line 317 of file Registry.h.
using Registry::AllTypes_t = typedef typename AllTypes<RegistryTraits>::type |
Definition at line 147 of file Registry.h.
using Registry::BaseItemTypes = typedef TypeList::List< detail::IndirectItemBase, detail::ComputedItemBase, struct SingleItem, struct detail::GroupItemBase > |
The underlying registry merging procedure assumes the listed types are an exhaustive partition
Definition at line 131 of file Registry.h.
using Registry::Path = typedef std::vector<Identifier> |
Definition at line 71 of file Registry.h.
|
inline |
A convenience function.
Definition at line 175 of file Registry.h.
void Registry::RegisterItem | ( | GroupItem< RegistryTraits > & | registry, |
const Placement & | placement, | ||
std::unique_ptr< Item > | pItem | ||
) |
Definition at line 371 of file Registry.h.
References Registry::detail::RegisterItem().
Referenced by PopupMenuTable::RegisterItem().
void Registry::Visit | ( | const Visitors & | visitors, |
const GroupItem< RegistryTraits > * | pTopItem, | ||
const GroupItem< RegistryTraits > * | pRegistry = {} , |
||
typename RegistryTraits::ComputedItemContextType & | computedItemContext = RegistryTraits::ComputedItemContextType::Instance |
||
) |
Top-down visitation of all items and groups in a tree rooted in pTopItem, as merged with pRegistry.
The merger of the trees is recomputed in each call, not saved. So neither given tree is modified. But there may be a side effect on preferences to remember the ordering imposed on each node of the unordered tree of registered items; each item seen in the registry for the first time is placed somewhere, and that ordering should be kept the same thereafter in later runs (which may add yet other previously unknown items).
visitors | A tuple of size 1 or 3, or a callable.
|
computedItemContext | is passed to factory functions of computed items |
Definition at line 609 of file Registry.h.
Referenced by PrefsPanel::DefaultFactories(), SnapFunctionsRegistry::Find(), ExportPluginRegistry::Initialize(), Importer::Initialize(), LibraryPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), and NumericConverterRegistry::Visit().
void Registry::VisitWithFunctions | ( | const VisitorFunctions< RegistryTraits > & | visitors, |
const GroupItem< RegistryTraits > * | pTopItem, | ||
const GroupItem< RegistryTraits > * | pRegistry = {} , |
||
typename RegistryTraits::ComputedItemContextType & | computedItemContext = RegistryTraits::ComputedItemContextType::Instance |
||
) |
Top-down visitation of all items and groups in a tree rooted in pTopItem, as merged with pRegistry.
The merger of the trees is recomputed in each call, not saved. So neither given tree is modified. But there may be a side effect on preferences to remember the ordering imposed on each node of the unordered tree of registered items; each item seen in the registry for the first time is placed somewhere, and that ordering should be kept the same thereafter in later runs (which may add yet other previously unknown items).
visitors | A tuple of size 1 or 3, or a callable.
|
computedItemContext | is passed to factory functions of computed items Like Visit but passing function(s) wrapped in std::function |
Definition at line 623 of file Registry.h.
Referenced by PopupMenuTable::ExtendMenu(), anonymous_namespace{RealtimeEffectPanel.cpp}::EffectsMenuHelper::Populate(), SnapFunctionsRegistry::Visit(), ProjectStatusFieldsRegistry::Visit(), and MenuRegistry::Visit().
|
constexpr |
Definition at line 138 of file Registry.h.
|
constexpr |
Definition at line 150 of file Registry.h.
|
constexpr |
Definition at line 332 of file Registry.h.
|
constexpr |
Supply this when one member of a visitor function triple isn't needed.
Definition at line 530 of file Registry.h.
Referenced by PrefsPanel::DefaultFactories().