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