20#ifndef LIBREPCB_CORE_DEVICE_H
21#define LIBREPCB_CORE_DEVICE_H
26#include "../../attribute/attribute.h"
27#include "../libraryelement.h"
63 const ElementName& name_en_US,
const QString& description_en_US,
64 const QString& keywords_en_US,
const Uuid& component,
91 static std::unique_ptr<Device>
open(
92 std::unique_ptr<TransactionalDirectory> directory,
93 bool abortBeforeMigration =
false);
95 return QStringLiteral(
"dev");
98 return QStringLiteral(
"device");
109 Device(std::unique_ptr<TransactionalDirectory> directory,
The Device class represents an instance of a component (a "real" component)
Definition: device.h:55
Uuid mPackageUuid
Definition: device.h:114
const PartList & getParts() const noexcept
Definition: device.h:78
DevicePadSignalMap & getPadSignalMap() noexcept
Definition: device.h:71
void packageUuidChanged(const Uuid &uuid)
virtual RuleCheckMessageList runChecks() const override
Definition: device.cpp:86
~Device() noexcept
Definition: device.cpp:63
PartList mParts
Definition: device.h:117
Uuid mComponentUuid
Definition: device.h:113
Device(const Device &other)=delete
Device & operator=(const Device &rhs)=delete
AttributeList & getAttributes() noexcept
Definition: device.h:75
const AttributeList & getAttributes() const noexcept
Definition: device.h:76
DevicePadSignalMap mPadSignalMap
Definition: device.h:115
const Uuid & getComponentUuid() const noexcept
Definition: device.h:69
const DevicePadSignalMap & getPadSignalMap() const noexcept
Definition: device.h:72
void setComponentUuid(const Uuid &uuid) noexcept
Definition: device.cpp:70
void setPackageUuid(const Uuid &uuid) noexcept
Definition: device.cpp:76
AttributeList mAttributes
Definition: device.h:116
PartList & getParts() noexcept
Definition: device.h:77
static QString getLongElementName() noexcept
Definition: device.h:97
static std::unique_ptr< Device > open(std::unique_ptr< TransactionalDirectory > directory, bool abortBeforeMigration=false)
Definition: device.cpp:91
void componentUuidChanged(const Uuid &uuid)
const Uuid & getPackageUuid() const noexcept
Definition: device.h:70
virtual void serialize(SExpression &root) const override
Serialize into librepcb::SExpression node.
Definition: device.cpp:123
static QString getShortElementName() noexcept
Definition: device.h:94
The LibraryElement class extends the LibraryBaseElement class with some attributes and methods which ...
Definition: libraryelement.h:45
The SExpression class.
Definition: sexpression.h:69
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, ElementNameConstraint, ElementNameVerifier > ElementName
Definition: elementname.h:84