28#ifndef DESIGN_BLOCK_INFO_H_
29#define DESIGN_BLOCK_INFO_H_
33#include <boost/ptr_container/ptr_vector.hpp>
47class wxTopLevelWindow;
71 wxString
GetName()
const override {
return m_dbname; }
81 void SetDesc(
const wxString& aDesc ) { m_doc = aDesc; }
105 bool InLibrary(
const wxString& aLibrary )
const;
144 typedef std::vector<std::unique_ptr<DESIGN_BLOCK_INFO>>
DBILIST;
154 unsigned GetCount()
const {
return m_list.size(); }
173 const wxString& aDesignBlockName );
187 std::unique_ptr<IO_ERROR> error;
189 m_errors.pop( error );
206 const wxString* aNickname =
nullptr,
DESIGN_BLOCK_LIST * m_owner
provides access to DESIGN_BLOCK_LIB_TABLE
wxString m_nickname
library as known in DESIGN_BLOCK_LIB_TABLE
void SetDesc(const wxString &aDesc)
virtual void load()
lazily load stuff not filled in by constructor. This may throw IO_ERRORS.
wxString m_dbname
Module name.
wxString GetDesc() override
wxString m_keywords
Design block keywords.
virtual ~DESIGN_BLOCK_INFO()
LIB_ID GetLIB_ID() const override
wxString GetLibNickname() const override
const wxString & GetDesignBlockName() const
int m_num
Order number in the display list.
wxString GetName() const override
wxString m_doc
Design block description.
Holds a list of DESIGN_BLOCK_INFO objects, along with a list of IO_ERRORs or PARSE_ERRORs that were t...
std::unique_ptr< IO_ERROR > PopError()
std::vector< std::unique_ptr< DESIGN_BLOCK_INFO > > DBILIST
const DBILIST & GetList() const
Was forced to add this by modview_frame.cpp.
DESIGN_BLOCK_LIB_TABLE * GetTable() const
unsigned GetCount() const
virtual bool ReadDesignBlockFiles(DESIGN_BLOCK_LIB_TABLE *aTable, const wxString *aNickname=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)=0
Read all the design blocks provided by the combination of aTable and aNickname.
DESIGN_BLOCK_INFO & GetItem(unsigned aIdx) const
Get info for a design block by index.
virtual ~DESIGN_BLOCK_LIST()
ERRLIST m_errors
some can be PARSE_ERRORs also
SYNC_QUEUE< std::unique_ptr< IO_ERROR > > ERRLIST
unsigned GetErrorCount() const
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A logical library item identifier and consists of various portions much like a URI.
A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).
virtual std::vector< SEARCH_TERM > GetSearchTerms()
A progress reporter interface for use in multi-threaded environments.
Synchronized, locking queue.
bool operator<(const DESIGN_BLOCK_INFO &lhs, const DESIGN_BLOCK_INFO &rhs)