LibrePCB Developers Documentation
|
The LibraryElement class extends the LibraryBaseElement class with some attributes and methods which are used for all library classes except categories. More...
#include <libraryelement.h>
Public Member Functions | |
LibraryElement ()=delete | |
LibraryElement (const LibraryElement &other)=delete | |
LibraryElement (const QString &shortElementName, const QString &longElementName, const Uuid &uuid, const Version &version, const QString &author, const ElementName &name_en_US, const QString &description_en_US, const QString &keywords_en_US) | |
LibraryElement (const QString &shortElementName, const QString &longElementName, bool dirnameMustBeUuid, std::unique_ptr< TransactionalDirectory > directory, const SExpression &root) | |
virtual | ~LibraryElement () noexcept |
const QString & | getGeneratedBy () const noexcept |
const QSet< Uuid > & | getCategories () const noexcept |
const ResourceList & | getResources () const noexcept |
void | setGeneratedBy (const QString &gen) noexcept |
void | setCategories (const QSet< Uuid > &uuids) noexcept |
void | setResources (const ResourceList &resources) noexcept |
virtual RuleCheckMessageList | runChecks () const override |
LibraryElement & | operator= (const LibraryElement &rhs)=delete |
Public Member Functions inherited from LibraryBaseElement | |
LibraryBaseElement ()=delete | |
LibraryBaseElement (const LibraryBaseElement &other)=delete | |
LibraryBaseElement (const QString &shortElementName, const QString &longElementName, const Uuid &uuid, const Version &version, const QString &author, const ElementName &name_en_US, const QString &description_en_US, const QString &keywords_en_US) | |
LibraryBaseElement (const QString &shortElementName, const QString &longElementName, bool dirnameMustBeUuid, std::unique_ptr< TransactionalDirectory > directory, const SExpression &root) | |
virtual | ~LibraryBaseElement () noexcept |
const TransactionalDirectory & | getDirectory () const noexcept |
TransactionalDirectory & | getDirectory () noexcept |
const Uuid & | getUuid () const noexcept |
const Version & | getVersion () const noexcept |
const QString & | getAuthor () const noexcept |
const QDateTime & | getCreated () const noexcept |
bool | isDeprecated () const noexcept |
const LocalizedNameMap & | getNames () const noexcept |
const LocalizedDescriptionMap & | getDescriptions () const noexcept |
const LocalizedKeywordsMap & | getKeywords () const noexcept |
QStringList | getAllAvailableLocales () const noexcept |
const QSet< SExpression > & | getMessageApprovals () const noexcept |
void | setVersion (const Version &version) noexcept |
void | setAuthor (const QString &author) noexcept |
void | setDeprecated (bool deprecated) noexcept |
void | setNames (const LocalizedNameMap &names) noexcept |
void | setDescriptions (const LocalizedDescriptionMap &descriptions) noexcept |
void | setKeywords (const LocalizedKeywordsMap &keywords) noexcept |
void | setMessageApprovals (const QSet< SExpression > &approvals) noexcept |
virtual void | save () |
virtual void | saveTo (TransactionalDirectory &dest) |
virtual void | moveTo (TransactionalDirectory &dest) |
virtual void | saveIntoParentDirectory (TransactionalDirectory &dest) |
virtual void | moveIntoParentDirectory (TransactionalDirectory &dest) |
LibraryBaseElement & | operator= (const LibraryBaseElement &rhs)=delete |
Protected Member Functions | |
virtual void | serialize (SExpression &root) const override |
Serialize into librepcb::SExpression node. | |
Protected Member Functions inherited from LibraryBaseElement | |
void | serializeMessageApprovals (SExpression &root) const |
void | removeObsoleteMessageApprovals () |
Protected Attributes | |
QString | mGeneratedBy |
If not empty, the element is generated. | |
QSet< Uuid > | mCategories |
ResourceList | mResources |
Protected Attributes inherited from LibraryBaseElement | |
const QString | mShortElementName |
e.g. "lib", "cmpcat" | |
const QString | mLongElementName |
e.g. "library", "component_category" | |
std::unique_ptr< TransactionalDirectory > | mDirectory |
Uuid | mUuid |
Version | mVersion |
QString | mAuthor |
QDateTime | mCreated |
bool | mIsDeprecated |
LocalizedNameMap | mNames |
LocalizedDescriptionMap | mDescriptions |
LocalizedKeywordsMap | mKeywords |
QSet< SExpression > | mMessageApprovals |
Additional Inherited Members | |
Static Public Member Functions inherited from LibraryBaseElement | |
template<typename ElementType > | |
static bool | isValidElementDirectory (const FilePath &dir) noexcept |
template<typename ElementType > | |
static bool | isValidElementDirectory (const TransactionalDirectory &dir, const QString &path) noexcept |
Static Protected Member Functions inherited from LibraryBaseElement | |
static Version | readFileFormat (const TransactionalDirectory &directory, const QString &fileName) |
The LibraryElement class extends the LibraryBaseElement class with some attributes and methods which are used for all library classes except categories.
|
delete |
|
delete |
LibraryElement | ( | const QString & | shortElementName, |
const QString & | longElementName, | ||
const Uuid & | uuid, | ||
const Version & | version, | ||
const QString & | author, | ||
const ElementName & | name_en_US, | ||
const QString & | description_en_US, | ||
const QString & | keywords_en_US | ||
) |
LibraryElement | ( | const QString & | shortElementName, |
const QString & | longElementName, | ||
bool | dirnameMustBeUuid, | ||
std::unique_ptr< TransactionalDirectory > | directory, | ||
const SExpression & | root | ||
) |
|
virtualnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
overridevirtual |
Reimplemented from LibraryBaseElement.
Reimplemented in Component, Device, Package, and Symbol.
|
delete |
|
overrideprotectedvirtual |
Serialize into librepcb::SExpression node.
root | Root node to serialize into. |
Reimplemented from LibraryBaseElement.
Reimplemented in Component, Device, Package, and Symbol.
|
protected |
If not empty, the element is generated.
|
protected |
|
protected |