mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-24 23:33:50 +02:00
Dispatch read of top-level project XML tags with a table of functions...
... which makes Project.cpp a bit less dependent on some details of other classes This puts Tags.cpp back into the big strongly connected component of the dependency graph. That will be remedied later when Project.cpp becomes a low-level file
This commit is contained in:
35
src/ProjectFileIORegistry.h
Normal file
35
src/ProjectFileIORegistry.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectFileIORegistry.h
|
||||
|
||||
Paul Licameli
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_FILE_IO_REGISTRY__
|
||||
#define __AUDACITY_PROJECT_FILE_IO_REGISTRY__
|
||||
|
||||
#include <functional>
|
||||
|
||||
class AudacityProject;
|
||||
class XMLTagHandler;
|
||||
class wxString;
|
||||
|
||||
namespace ProjectFileIORegistry {
|
||||
|
||||
// Type of functions returning objects that intepret a part of the saved XML
|
||||
using TagHandlerFactory =
|
||||
std::function< XMLTagHandler *( AudacityProject & ) >;
|
||||
|
||||
// Typically statically constructed
|
||||
struct Entry{
|
||||
Entry( const wxString &tag, const TagHandlerFactory &factory );
|
||||
};
|
||||
|
||||
TagHandlerFactory Lookup( const wxString &tag );
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user