Audacity 3.2.0
Public Member Functions | Private Member Functions | List of all members
Registry::InlineGroupItem< VisitorType > Struct Template Reference

#include <Registry.h>

Inheritance diagram for Registry::InlineGroupItem< VisitorType >:
[legend]
Collaboration diagram for Registry::InlineGroupItem< VisitorType >:
[legend]

Public Member Functions

template<typename... Args>
 InlineGroupItem (const Identifier &internalName, Args &&... args)
 
 GroupItem (const Identifier &internalName, BaseItemPtrs &&items_)
 
 GroupItem (const GroupItem &) PROHIBITED
 
- Public Member Functions inherited from Registry::GroupItem
 GroupItem (const Identifier &internalName, BaseItemPtrs &&items_)
 
 GroupItem (const GroupItem &) PROHIBITED
 
 ~GroupItem () override=0
 
virtual bool Transparent () const =0
 
 BaseItem (const Identifier &internalName)
 
- Public Member Functions inherited from Registry::BaseItem
 BaseItem (const Identifier &internalName)
 
virtual ~BaseItem ()
 

Private Member Functions

void Append ()
 
template<typename Arg , typename... Args>
void Append (Arg &&arg, Args &&... moreArgs)
 
void AppendOne (BaseItemPtr &&ptr)
 
void AppendOne (const ComputedItem::Factory< VisitorType > &factory)
 
template<typename Subtype >
void AppendOne (const std::shared_ptr< Subtype > &ptr)
 

Additional Inherited Members

- Public Attributes inherited from Registry::GroupItem
BaseItemPtrs items
 
- Public Attributes inherited from Registry::BaseItem
const Identifier name
 
OrderingHint orderingHint
 

Detailed Description

template<typename VisitorType = ComputedItem::DefaultVisitor>
struct Registry::InlineGroupItem< VisitorType >

Definition at line 146 of file Registry.h.

Constructor & Destructor Documentation

◆ InlineGroupItem()

template<typename VisitorType = ComputedItem::DefaultVisitor>
template<typename... Args>
Registry::InlineGroupItem< VisitorType >::InlineGroupItem ( const Identifier internalName,
Args &&...  args 
)
inline

Definition at line 150 of file Registry.h.

151 : GroupItem( internalName )
152 { Append( std::forward< Args >( args )... ); }
GroupItem(const Identifier &internalName, BaseItemPtrs &&items_)
Definition: Registry.h:131

References Registry::InlineGroupItem< VisitorType >::Append().

Here is the call graph for this function:

Member Function Documentation

◆ Append() [1/2]

template<typename VisitorType = ComputedItem::DefaultVisitor>
void Registry::InlineGroupItem< VisitorType >::Append ( )
inlineprivate

Definition at line 156 of file Registry.h.

156{}

Referenced by Registry::InlineGroupItem< VisitorType >::Append(), and Registry::InlineGroupItem< VisitorType >::InlineGroupItem().

Here is the caller graph for this function:

◆ Append() [2/2]

template<typename VisitorType = ComputedItem::DefaultVisitor>
template<typename Arg , typename... Args>
void Registry::InlineGroupItem< VisitorType >::Append ( Arg &&  arg,
Args &&...  moreArgs 
)
inlineprivate

Definition at line 159 of file Registry.h.

160 {
161 // Dispatch one argument to the proper overload of AppendOne.
162 // std::forward preserves rvalue/lvalue distinction of the actual
163 // argument of the constructor call; that is, it inserts a
164 // std::move() if and only if the original argument is rvalue
165 AppendOne( std::forward<Arg>( arg ) );
166 // recur with the rest of the arguments
167 Append( std::forward<Args>(moreArgs)... );
168 };
void AppendOne(BaseItemPtr &&ptr)
Definition: Registry.h:171

References Registry::InlineGroupItem< VisitorType >::Append(), and Registry::InlineGroupItem< VisitorType >::AppendOne().

Here is the call graph for this function:

◆ AppendOne() [1/3]

template<typename VisitorType = ComputedItem::DefaultVisitor>
void Registry::InlineGroupItem< VisitorType >::AppendOne ( BaseItemPtr &&  ptr)
inlineprivate

Definition at line 171 of file Registry.h.

172 {
173 items.push_back( std::move( ptr ) );
174 }
BaseItemPtrs items
Definition: Registry.h:141

References Registry::GroupItem::items.

Referenced by Registry::InlineGroupItem< VisitorType >::Append(), and Registry::InlineGroupItem< VisitorType >::AppendOne().

Here is the caller graph for this function:

◆ AppendOne() [2/3]

template<typename VisitorType = ComputedItem::DefaultVisitor>
void Registry::InlineGroupItem< VisitorType >::AppendOne ( const ComputedItem::Factory< VisitorType > &  factory)
inlineprivate

Definition at line 181 of file Registry.h.

182 {
183 auto adaptedFactory = [factory]( Registry::Visitor &visitor ){
184 return factory( dynamic_cast< VisitorType& >( visitor ) );
185 };
186 AppendOne( std::make_unique<ComputedItem>( adaptedFactory ) );
187 }
static RegisteredToolbarFactory factory

References Registry::InlineGroupItem< VisitorType >::AppendOne(), and cloud::factory.

Here is the call graph for this function:

◆ AppendOne() [3/3]

template<typename VisitorType = ComputedItem::DefaultVisitor>
template<typename Subtype >
void Registry::InlineGroupItem< VisitorType >::AppendOne ( const std::shared_ptr< Subtype > &  ptr)
inlineprivate

Definition at line 190 of file Registry.h.

191 { AppendOne( std::make_unique<SharedItem>(ptr) ); }

References Registry::InlineGroupItem< VisitorType >::AppendOne().

Here is the call graph for this function:

◆ GroupItem() [1/2]

template<typename VisitorType = ComputedItem::DefaultVisitor>
Registry::GroupItem::GroupItem ( const GroupItem )

◆ GroupItem() [2/2]

template<typename VisitorType = ComputedItem::DefaultVisitor>
Registry::GroupItem::GroupItem ( const Identifier internalName,
BaseItemPtrs &&  items_ 
)
inline

Definition at line 131 of file Registry.h.

132 : BaseItem{ internalName }, items{ std::move( items_ ) }
133 {}
BaseItem(const Identifier &internalName)
Definition: Registry.h:62

The documentation for this struct was generated from the following file: