1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

BlockFile.cpp does not depend on MissingAliasFileDialog.cpp ...

... instead use a hook function to call back when it is discovered that a
block file is missing.

This frees three files from dependency cycles
This commit is contained in:
Paul Licameli
2019-05-12 13:02:23 -04:00
parent 96ffc424cf
commit ce27977ff2
3 changed files with 39 additions and 3 deletions

View File

@@ -18,6 +18,8 @@
#include "ondemand/ODTaskThread.h"
#include <functional>
class XMLWriter;
class SummaryInfo {
@@ -49,6 +51,14 @@ inline std::shared_ptr< Result > make_blockfile (Args && ... args)
class PROFILE_DLL_API BlockFile /* not final, abstract */ {
public:
// Type of function to be called when opening of an alias block file for read
// discovers that the other audio file it depends on is absent
using MissingAliasFileFoundHook =
std::function< void(const AliasBlockFile*) >;
// Install a hook, and return the previous hook
static MissingAliasFileFoundHook
SetMissingAliasFileFound( MissingAliasFileFoundHook hook );
// Constructor / Destructor
/// Construct a BlockFile.