22#ifndef DESIGN_BLOCK_LIBRARY_ADAPTER_H
23#define DESIGN_BLOCK_LIBRARY_ADAPTER_H
41 static wxString GlobalPathEnvVariableName();
46 std::vector<DESIGN_BLOCK*> GetDesignBlocks(
const wxString& aNickname );
49 std::vector<wxString> GetDesignBlockNames(
const wxString& aNickname );
64 DESIGN_BLOCK* LoadDesignBlock(
const wxString& aNickname,
const wxString& aDesignBlockName,
65 bool aKeepUUID =
false );
70 bool DesignBlockExists(
const wxString& aNickname,
const wxString& aDesignBlockName );
79 const DESIGN_BLOCK* GetEnumeratedDesignBlock(
const wxString& aNickname,
const wxString& aDesignBlockName );
104 SAVE_T SaveDesignBlock(
const wxString& aNickname,
const DESIGN_BLOCK* aDesignBlock,
105 bool aOverwrite =
true );
116 void DeleteDesignBlock(
const wxString& aNickname,
const wxString& aDesignBlockName );
125 bool IsDesignBlockLibWritable(
const wxString& aNickname );
142 bool aKeepUUID =
false );
144 std::optional<LIBRARY_ERROR> LibraryError(
const wxString& aNickname )
const;
SAVE_T
The set of return values from DesignBlockSave() below.
std::map< wxString, LIB_DATA > & globalLibs() const override
static std::mutex GlobalLibraryMutex
std::map< wxString, LIB_DATA > & globalLibs() override
LIBRARY_TABLE_TYPE Type() const override
The type of library table this adapter works with.
static std::map< wxString, LIB_DATA > GlobalLibraries
DESIGN_BLOCK_LIBRARY_ADAPTER(LIBRARY_MANAGER &aManager)
std::mutex & globalLibsMutex() override
LIBRARY_MANAGER_ADAPTER(LIBRARY_MANAGER &aManager)
Constructs a type-specific adapter into the library manager.
virtual void AsyncLoad()=0
Loads all available libraries for this adapter type in the background.
virtual LIBRARY_RESULT< IO_BASE * > createPlugin(const LIBRARY_TABLE_ROW *row)=0
Creates a concrete plugin for the given row.
A logical library item identifier and consists of various portions much like a URI.
Container for project specific data.
tl::expected< ResultType, LIBRARY_ERROR > LIBRARY_RESULT
Storage for an actual loaded library (including library content owned by the plugin)