22#ifndef DESIGN_BLOCK_LIBRARY_ADAPTER_H
23#define DESIGN_BLOCK_LIBRARY_ADAPTER_H
42 static wxString GlobalPathEnvVariableName();
46 std::optional<LIB_STATUS>
LoadOne(
const wxString& nickname );
49 std::vector<DESIGN_BLOCK*> GetDesignBlocks(
const wxString& aNickname );
52 std::vector<wxString> GetDesignBlockNames(
const wxString& aNickname );
67 DESIGN_BLOCK* LoadDesignBlock(
const wxString& aNickname,
const wxString& aDesignBlockName,
68 bool aKeepUUID =
false );
73 bool DesignBlockExists(
const wxString& aNickname,
const wxString& aDesignBlockName );
82 const DESIGN_BLOCK* GetEnumeratedDesignBlock(
const wxString& aNickname,
const wxString& aDesignBlockName );
107 SAVE_T SaveDesignBlock(
const wxString& aNickname,
const DESIGN_BLOCK* aDesignBlock,
108 bool aOverwrite =
true );
119 void DeleteDesignBlock(
const wxString& aNickname,
const wxString& aDesignBlockName );
128 bool IsDesignBlockLibWritable(
const wxString& aNickname );
145 bool aKeepUUID =
false );
SAVE_T
The set of return values from DesignBlockSave() below.
std::shared_mutex & globalLibsMutex() override
std::map< wxString, LIB_DATA > & globalLibs() const override
static LEAK_AT_EXIT< std::map< wxString, LIB_DATA > > GlobalLibraries
std::map< wxString, LIB_DATA > & globalLibs() override
LIBRARY_TABLE_TYPE Type() const override
The type of library table this adapter works with.
DESIGN_BLOCK_LIBRARY_ADAPTER(LIBRARY_MANAGER &aManager)
std::shared_mutex & globalLibsMutex() const override
static std::shared_mutex GlobalLibraryMutex
A wrapper for static data that should not be destroyed at program exit.
virtual std::optional< LIB_STATUS > LoadOne(LIB_DATA *aLib)=0
LIBRARY_MANAGER_ADAPTER(LIBRARY_MANAGER &aManager)
Constructs a type-specific adapter into the library manager.
virtual LIBRARY_RESULT< IO_BASE * > createPlugin(const LIBRARY_TABLE_ROW *row)=0
Creates a concrete plugin for the given row.
virtual IO_BASE * plugin(const LIB_DATA *aRow)=0
virtual void enumerateLibrary(LIB_DATA *aLib)=0
Override in derived class to perform library-specific enumeration.
A logical library item identifier and consists of various portions much like a URI.
Container for project specific data.
Utilities for intentionally "leaking" memory at program exit.
tl::expected< ResultType, LIBRARY_ERROR > LIBRARY_RESULT
Storage for an actual loaded library (including library content owned by the plugin)