21#ifndef LIBRARY_TABLE_H
22#define LIBRARY_TABLE_H
26#include <wx/filename.h>
50struct LIBRARY_TABLE_INTERNALS;
90 std::map<std::string, UTF8> GetOptionsMap()
const;
159 const std::vector<LIBRARY_TABLE_ROW>&
Rows()
const {
return m_rows; }
164 bool HasRow(
const wxString& aNickname )
const;
171 bool HasRowWithURI(
const wxString& aUri,
const PROJECT& aProject,
172 bool aSubstituted =
false )
const;
174 std::optional<LIBRARY_TABLE_ROW*> Row(
const wxString& aNickname );
175 std::optional<const LIBRARY_TABLE_ROW*> Row(
const wxString& aNickname )
const;
bool operator==(const wxAuiPaneInfo &aLhs, const wxAuiPaneInfo &aRhs)
void SetOptions(const wxString &aOptions)
LIBRARY_TABLE_ROW()=default
LIBRARY_TABLE_SCOPE Scope() const
void SetNickname(const wxString &aNickname)
void SetOk(bool aOk=true)
void SetType(const wxString &aType)
void SetErrorDescription(const wxString &aDescription)
const wxString & ErrorDescription() const
wxString m_errorDescription
void SetDescription(const wxString &aDescription)
const wxString & Type() const
static const wxString TABLE_TYPE_NAME
void SetURI(const wxString &aUri)
const wxString & Description() const
void SetDisabled(bool aDisabled=true)
void SetScope(LIBRARY_TABLE_SCOPE aScope)
LIBRARY_TABLE_SCOPE m_scope
void SetHidden(bool aHidden=true)
const wxString & URI() const
const wxString & Nickname() const
const wxString & Options() const
friend class LIBRARY_TABLE
void SetScope(LIBRARY_TABLE_SCOPE aScope)
LIBRARY_TABLE_TYPE Type() const
LIBRARY_TABLE_TYPE m_type
What type of content this table contains (footprint, symbol, design block, etc)
void SetType(const LIBRARY_TABLE_TYPE aType)
void SetPath(const wxString &aPath)
std::vector< LIBRARY_TABLE_ROW > m_rows
LIBRARY_TABLE_ROW & InsertRow()
Builds a new row and inserts it at the end of the table; returning a reference to the row.
const wxString & Path() const
wxString m_path
The full path to the file this table was parsed from, if any.
wxString m_errorDescription
LIBRARY_TABLE_SCOPE Scope() const
LIBRARY_TABLE_ROW MakeRow() const
Builds a new row that is suitable for this table (does not insert it)
std::optional< int > Version() const
LIBRARY_TABLE(const wxFileName &aPath, LIBRARY_TABLE_SCOPE aScope)
Creates a library table from a file on disk.
const wxString & ErrorDescription() const
std::vector< LIBRARY_TABLE_ROW > & Rows()
std::optional< int > m_version
The format version, if present in the parsed file.
const std::vector< LIBRARY_TABLE_ROW > & Rows() const
LIBRARY_TABLE_SCOPE m_scope
void SetVersion(const std::optional< int > &aVersion)
Container for project specific data.
A base class for LIB_SYMBOL and SCH_SYMBOL.
std::vector< LIBRARY_TABLE_ROW >::iterator LIBRARY_TABLE_ROWS_ITER
std::vector< LIBRARY_TABLE_ROW >::const_iterator LIBRARY_TABLE_ROWS_CITER
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
The intermediate representation that a library table is parsed into.