20 #ifndef LIBREPCB_CORE_PACKAGE_H 21 #define LIBREPCB_CORE_PACKAGE_H 26 #include "../../types/simplestring.h" 27 #include "../libraryelement.h" 69 : name(name), reference(reference) {}
91 const ElementName& name_en_US,
const QString& description_en_US,
92 const QString& keywords_en_US,
AssemblyType assemblyType);
106 const Uuid& fpt)
const noexcept;
120 static std::unique_ptr<Package>
open(
121 std::unique_ptr<TransactionalDirectory> directory,
122 bool abortBeforeMigration =
false);
124 return QStringLiteral(
"pkg");
127 return QStringLiteral(
"package");
134 Package(std::unique_ptr<TransactionalDirectory> directory,
QVector< std::shared_ptr< const PackageModel > > getModelsForFootprint(const Uuid &fpt) const noexcept
Definition: package.cpp:158
The Version class represents a version number in the format "1.42.7".
Definition: version.h:58
const QList< AlternativeName > & getAlternativeNames() const noexcept
Definition: package.h:96
const PackagePadList & getPads() const noexcept
Definition: package.h:102
Definition: occmodel.cpp:77
PackagePadList mPads
empty list if the package has no pads
Definition: package.h:140
~Package() noexcept
Definition: package.cpp:111
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104
QList< AlternativeName > mAlternativeNames
Optional.
Definition: package.h:138
AlternativeName(const SExpression &node)
Definition: package.h:70
static QString getLongElementName() noexcept
Definition: package.h:126
type_safe::constrained_type< QString, SimpleStringConstraint, SimpleStringVerifier > SimpleString
Definition: simplestring.h:80
AlternativeName(const ElementName &name, const SimpleString &reference)
Definition: package.h:68
The Package class represents a package of a component (including footprint and 3D model) ...
Definition: package.h:59
AssemblyType mAssemblyType
Package assembly type (metadata)
Definition: package.h:139
SimpleString reference
Definition: package.h:66
PackageModelList mModels
3D models (optional)
Definition: package.h:141
AssemblyType guessAssemblyType() const noexcept
Definition: package.cpp:127
PackageModelList & getModels() noexcept
Definition: package.h:103
static QString getShortElementName() noexcept
Definition: package.h:123
AssemblyType
Definition: package.h:78
Package & operator=(const Package &rhs)=delete
void appendChild(std::unique_ptr< SExpression > child)
Definition: sexpression.cpp:217
FootprintList mFootprints
minimum one footprint
Definition: package.h:142
The LibraryElement class extends the LibraryBaseElement class with some attributes and methods which ...
Definition: libraryelement.h:45
void setAssemblyType(AssemblyType type) noexcept
Definition: package.h:111
AttributeKey deserialize(const SExpression &node)
Definition: attributekey.h:105
static std::unique_ptr< Package > open(std::unique_ptr< TransactionalDirectory > directory, bool abortBeforeMigration=false)
Definition: package.cpp:180
AssemblyType getAssemblyType(bool resolveAuto) const noexcept
Definition: package.cpp:118
void serialize(SExpression &root) const
Definition: package.h:73
PackagePadList & getPads() noexcept
Definition: package.h:101
FootprintList & getFootprints() noexcept
Definition: package.h:107
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
const PackageModelList & getModels() const noexcept
Definition: package.h:104
virtual RuleCheckMessageList runChecks() const override
Definition: package.cpp:175
The SExpression class.
Definition: sexpression.h:69
ElementName name
Definition: package.h:65
const FootprintList & getFootprints() const noexcept
Definition: package.h:108
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition: elementname.h:84