Audacity 3.2.0
Classes | Namespaces | Typedefs | Functions | Variables
Registry.h File Reference
#include "Prefs.h"
#include "Composite.h"
#include "TypeSwitch.h"
#include "Variant.h"
#include <functional>
#include <type_traits>
#include <utility>
Include dependency graph for Registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Registry::EmptyContext
 
struct  Registry::DefaultTraits
 
struct  Registry::OrderingHint
 
struct  Registry::detail::BaseItem
 
struct  Registry::detail::IndirectItemBase
 
struct  Registry::detail::ConsUnique< Type, List >
 
struct  Registry::detail::ConsUnique< Type, List >::NotAlready< L >
 
struct  Registry::AllTypes< RegistryTraits >
 
struct  Registry::detail::IndirectItem< Item >
 An item that delegates to another held in a shared pointer. More...
 
struct  Registry::detail::ComputedItemBase
 
struct  Registry::detail::ComputedItem< Context, Item >
 
struct  Registry::SingleItem
 Common abstract base class for items that are not groups. More...
 
struct  Registry::detail::GroupItemBase
 Common abstract base class for items that group other items. More...
 
struct  Composite::Traits< Registry::detail::GroupItemBase, Registry::GroupItem< RegistryTraits > >
 
struct  Registry::GroupItem< RegistryTraits >
 Has variadic and range constructors that check types. More...
 
struct  Registry::Placement
 
struct  Registry::ActualItem< T >
 Find the real item type (following chains of indirections) More...
 
struct  Registry::ActualItem< detail::IndirectItem< T > >
 
struct  Registry::ActualItem< detail::ComputedItem< C, T > >
 
struct  Registry::AcceptableItemType< Item, TypeList >
 
struct  Registry::detail::Builder< RegistryTraits >
 
class  Registry::RegisteredItem< RegistryClass >
 Generates classes whose instances register items at construction. More...
 
struct  Registry::VisitorFunctions< RegistryTraits, Reference >
 
class  Registry::detail::VisitorBase
 
struct  Registry::detail::Visitor< RegistryTraits, Visitors >
 Type-erasing adapter class (with no std::function overhead) More...
 
struct  Registry::OrderingPreferenceInitializer
 

Namespaces

namespace  Registry
 
namespace  Registry::detail
 

Typedefs

using Registry::Path = std::vector< Identifier >
 
using Registry::detail::BaseItemPtr = std::unique_ptr< BaseItem >
 
using Registry::detail::BaseItemSharedPtr = std::shared_ptr< BaseItem >
 
template<typename Type , typename List >
using Registry::detail::ConsUnique_t = typename ConsUnique< Type, List >::type
 
template<typename RegistryTraits >
using Registry::detail::VisitedNodeTypes = ConsUnique_t< const GroupItem< RegistryTraits >, Map_t< Fn< std::add_const_t >, typename RegistryTraits::NodeTypes > >
 
template<typename RegistryTraits >
using Registry::detail::VisitedLeafTypes = ConsUnique_t< const SingleItem, Map_t< Fn< std::add_const_t >, typename RegistryTraits::LeafTypes > >
 
template<typename Types >
using Registry::detail::VisitorFunction = std::function< void(Head_t< Types > &, const Path &)>
 
using Registry::BaseItemTypes = TypeList::List< detail::IndirectItemBase, detail::ComputedItemBase, struct SingleItem, struct detail::GroupItemBase >
 
template<typename Item >
using Registry::AcceptableBaseItem = TypeList::HasBaseIn< Item, BaseItemTypes >
 
template<typename RegistryTraits >
using Registry::AllTypes_t = typename AllTypes< RegistryTraits >::type
 
template<typename T >
using Registry::ActualItem_t = typename ActualItem< T >::type
 
template<typename RegistryTraits , typename Item >
using Registry::AcceptableType = AcceptableItemType< Item, AllTypes_t< RegistryTraits > >
 
template<typename RegistryTraits >
using Registry::detail::NodeVisitorFunction = VisitorFunction< VisitedNodeTypes< RegistryTraits > >
 
template<typename RegistryTraits >
using Registry::detail::LeafVisitorFunction = VisitorFunction< VisitedLeafTypes< RegistryTraits > >
 
template<typename RegistryTraits >
using Registry::detail::VisitorFunctionTriple = std::tuple< NodeVisitorFunction< RegistryTraits >, LeafVisitorFunction< RegistryTraits >, NodeVisitorFunction< RegistryTraits > >
 

Functions

template<typename Item >
std::unique_ptr< detail::IndirectItem< Item > > Registry::Indirect (const std::shared_ptr< Item > &ptr)
 A convenience function. More...
 
REGISTRIES_API void Registry::detail::RegisterItem (GroupItemBase &registry, const Placement &placement, BaseItemPtr pItem)
 Type-erased implementation details, don't call directly. More...
 
template<typename RegistryTraits , typename Item >
void Registry::RegisterItem (GroupItem< RegistryTraits > &registry, const Placement &placement, std::unique_ptr< Item > pItem)
 
template<typename V >
auto Registry::detail::ForwardTuple_ (const V &visitor, std::false_type)
 
template<typename V >
auto Registry::detail::ForwardTuple_ (const V &visitor, std::true_type)
 
template<typename V >
auto Registry::detail::ForwardTuple (const V &visitor)
 
template<typename V >
auto Registry::detail::MakeTuple_ (const V &visitor, std::false_type)
 
template<typename V >
auto Registry::detail::MakeTuple_ (const V &visitor, std::true_type)
 
template<typename V >
auto Registry::detail::MakeTuple (const V &visitor)
 
template<typename V >
auto Registry::detail::CaptureTuple_ (const V &visitor, std::true_type)
 
template<typename V >
auto Registry::detail::CaptureTuple_ (const V &visitor, std::false_type)
 
template<bool Reference, typename V >
auto Registry::detail::CaptureTuple (const V &visitor)
 
template<typename Types , bool Reference, typename Visitor >
VisitorFunction< Types > Registry::detail::MakeVisitorFunction (const Visitor &visitor)
 Capture a callable for Visit() in a std::function wrapper. More...
 
REGISTRIES_API void Registry::detail::Visit (VisitorBase &visitor, const GroupItemBase *pTopItem, const GroupItemBase *pRegistry, void *pComputedItemContext)
 
template<typename RegistryTraits , typename Visitors >
void Registry::Visit (const Visitors &visitors, const GroupItem< RegistryTraits > *pTopItem, const GroupItem< RegistryTraits > *pRegistry={}, typename RegistryTraits::ComputedItemContextType &computedItemContext=RegistryTraits::ComputedItemContextType::Instance)
 
template<typename RegistryTraits >
void Registry::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 Registry::AcceptableBaseItem_v
 
template<typename RegistryTraits >
constexpr auto Registry::AcceptableTraits_v
 
template<typename RegistryTraits , typename Item >
constexpr auto Registry::AcceptableType_v
 
template<typename Visitors >
static constexpr auto Registry::detail::TupleSize
 How large a tuple to make from Visitors. More...
 
constexpr auto Registry::NoOp = [](auto&, auto&){}
 Supply this when one member of a visitor function triple isn't needed. More...