Audacity  3.0.3
Public Types | Public Member Functions | List of all members
ReservedCommandFlag Class Reference

#include <CommandFlag.h>

Inheritance diagram for ReservedCommandFlag:
[legend]
Collaboration diagram for ReservedCommandFlag:
[legend]

Public Types

using Predicate = std::function< bool(const AudacityProject &) >
 

Public Member Functions

 ReservedCommandFlag (const Predicate &predicate, const CommandFlagOptions &options={})
 

Detailed Description

Definition at line 88 of file CommandFlag.h.

Member Typedef Documentation

◆ Predicate

using ReservedCommandFlag::Predicate = std::function< bool( const AudacityProject& ) >

Definition at line 91 of file CommandFlag.h.

Constructor & Destructor Documentation

◆ ReservedCommandFlag()

ReservedCommandFlag::ReservedCommandFlag ( const Predicate predicate,
const CommandFlagOptions options = {} 
)

Definition at line 534 of file Menus.cpp.

536 {
537  static size_t sNextReservedFlag = 0;
538  // This will throw std::out_of_range if the constant NCommandFlags is too
539  // small
540  set( sNextReservedFlag++ );
541  RegisteredPredicates().emplace_back( predicate );
542  Options().emplace_back( options );
543 }

References anonymous_namespace{Menus.cpp}::Options(), anonymous_namespace{Menus.cpp}::RegisteredPredicates(), and set.

Here is the call graph for this function:

The documentation for this class was generated from the following files:
set
#define set(f, v)
anonymous_namespace{Menus.cpp}::RegisteredPredicates
Predicates & RegisteredPredicates()
Definition: Menus.cpp:522
anonymous_namespace{Menus.cpp}::Options
std::vector< CommandFlagOptions > & Options()
Definition: Menus.cpp:527