24#ifndef DESIGN_BLOCK_LIB_TABLE_H_
25#define DESIGN_BLOCK_LIB_TABLE_H_
43 const wxString& aOptions,
const wxString& aDescr = wxEmptyString ) :
59 return !( *
this == aRow );
70 void SetType(
const wxString& aType )
override;
75 return plugin->CanReadLibrary(
GetFullURI(
true ) );
110 virtual void Parse( LIB_TABLE_LEXER* aLexer )
override;
144 bool aCheckIfEnabled =
false );
156 void DesignBlockEnumerate( wxArrayString& aDesignBlockNames,
const wxString& aNickname,
163 long long GenerateTimestamp(
const wxString* aNickname );
178 DESIGN_BLOCK* DesignBlockLoad(
const wxString& aNickname,
const wxString& aDesignBlockName,
179 bool aKeepUUID =
false );
184 bool DesignBlockExists(
const wxString& aNickname,
const wxString& aDesignBlockName );
192 const DESIGN_BLOCK* GetEnumeratedDesignBlock(
const wxString& aNickname,
193 const wxString& aDesignBlockName );
217 SAVE_T DesignBlockSave(
const wxString& aNickname,
const DESIGN_BLOCK* aDesignBlock,
218 bool aOverwrite =
true );
229 void DesignBlockDelete(
const wxString& aNickname,
const wxString& aDesignBlockName );
238 bool IsDesignBlockLibWritable(
const wxString& aNickname );
240 void DesignBlockLibDelete(
const wxString& aNickname );
242 void DesignBlockLibCreate(
const wxString& aNickname );
259 bool aKeepUUID =
false );
282 static wxString GetGlobalTableFileName();
292 static const wxString GlobalPathEnvVariableName();
static const wxString ShowType(DESIGN_BLOCK_FILE_T aFileType)
This class builds a wxGridTableBase by wrapping an DESIGN_BLOCK_LIB_TABLE object.
Hold a record identifying a library accessed by the appropriate design block library #PLUGIN object i...
DESIGN_BLOCK_LIB_TABLE_ROW(const DESIGN_BLOCK_LIB_TABLE_ROW &aRow)
const wxString GetType() const override
Return the type of design block library table represented by this row.
DESIGN_BLOCK_IO_MGR::DESIGN_BLOCK_FILE_T GetFileType()
DESIGN_BLOCK_LIB_TABLE_ROW(const wxString &aNick, const wxString &aURI, const wxString &aType, const wxString &aOptions, const wxString &aDescr=wxEmptyString)
DESIGN_BLOCK_LIB_TABLE_ROW()
bool LibraryExists() const override
void setPlugin(DESIGN_BLOCK_IO *aPlugin)
DESIGN_BLOCK_IO_MGR::DESIGN_BLOCK_FILE_T type
virtual LIB_TABLE_ROW * do_clone() const override
IO_RELEASER< DESIGN_BLOCK_IO > plugin
bool operator!=(const DESIGN_BLOCK_LIB_TABLE_ROW &aRow) const
bool operator!=(const DESIGN_BLOCK_LIB_TABLE &r) const
PROJECT::ELEM ProjectElementType() override
SAVE_T
The set of return values from DesignBlockSave() below.
A logical library item identifier and consists of various portions much like a URI.
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
void Format(OUTPUTFORMATTER *out, int nestLevel) const
Serialize this object as utf8 text to an OUTPUTFORMATTER, and tries to make it look good using multip...
virtual void SetType(const wxString &aType)=0
Change the type of library represented by this row that must be implemented in the derived object to ...
const wxString GetFullURI(bool aSubstituted=false) const
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
bool operator==(const LIB_TABLE_ROW &r) const
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.
ELEM
The set of #_ELEMs that a PROJECT can hold.
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.