Audacity 3.2.0
Classes | Functions | Variables
anonymous_namespace{Track.cpp} Namespace Reference

Classes

struct  TrackListRestorer
 

Functions

double Accumulate (const TrackList &list, double(Track::*memfn)() const, double ident, const double &(*combine)(const double &, const double &))
 

Variables

UndoRedoExtensionRegistry::Entry sEntry
 

Function Documentation

◆ Accumulate()

double anonymous_namespace{Track.cpp}::Accumulate ( const TrackList list,
double(Track::*)() const  memfn,
double  ident,
const double &(*)(const double &, const double &)  combine 
)
inline

Definition at line 972 of file Track.cpp.

975 {
976 // Default the answer to zero for empty list
977 if (list.empty())
978 return 0.0;
979
980 // Otherwise accumulate minimum or maximum of track values
981 return list.Any().accumulate(ident, combine, memfn);
982 }
static CommandHandlerObject & ident(AudacityProject &project)
bool empty() const
Definition: Track.cpp:955
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1079

References TrackList::Any(), TrackList::empty(), and ident().

Referenced by TrackList::GetEndTime(), and TrackList::GetStartTime().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sEntry

UndoRedoExtensionRegistry::Entry anonymous_namespace{Track.cpp}::sEntry
Initial value:
{
[](AudacityProject &project) -> std::shared_ptr<UndoStateExtension> {
return std::make_shared<TrackListRestorer>(project);
}
}
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90

Definition at line 1399 of file Track.cpp.