20#ifndef LIBREPCB_CORE_OUTPUTJOB_H
21#define LIBREPCB_CORE_OUTPUTJOB_H
26#include "../serialization/serializableobjectlist.h"
27#include "../types/elementname.h"
28#include "../types/uuid.h"
29#include "../utils/toolbox.h"
70 if (firstNode && (firstNode->
getValue() ==
"all")) {
72 }
else if (firstNode && (firstNode->
getValue() ==
"default")) {
82 return (
mAll == rhs.mAll) && (
mDefault == rhs.mDefault) &&
86 return !(*
this == rhs);
144 virtual std::shared_ptr<OutputJob>
cloneShared() const noexcept = 0;
154 bool operator==(const
OutputJob& rhs) const noexcept;
156 return !(*
this == rhs);
Base class for all output job types.
Definition: outputjob.h:50
void setName(const ElementName &name) noexcept
Definition: outputjob.cpp:124
virtual bool equals(const OutputJob &rhs) const noexcept=0
OutputJob & operator=(const OutputJob &rhs)=delete
QMap< QString, QList< SExpression > > mOptions
Definition: outputjob.h:175
virtual QSet< Uuid > getDependencies() const noexcept
Definition: outputjob.h:136
virtual QString getTypeTr() const noexcept=0
const ElementName & getName() const noexcept
Definition: outputjob.h:135
Uuid mUuid
Definition: outputjob.h:170
virtual std::shared_ptr< OutputJob > cloneShared() const noexcept=0
Event
Definition: outputjob.h:55
virtual ~OutputJob() noexcept
Definition: outputjob.cpp:110
ElementName mName
Definition: outputjob.h:171
const QString mType
Definition: outputjob.h:169
void setUuid(const Uuid &uuid) noexcept
Definition: outputjob.cpp:117
virtual void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: outputjob.cpp:135
const Uuid & getUuid() const noexcept
Definition: outputjob.h:134
virtual void serializeDerived(SExpression &root) const =0
Signal< OutputJob, Event > onEdited
Definition: outputjob.h:60
Slot< OutputJob, Event > OnEditedSlot
Definition: outputjob.h:61
virtual QIcon getTypeIcon() const noexcept=0
virtual void removeDependency(const Uuid &jobUuid)
Definition: outputjob.h:143
const QString & getType() const noexcept
Definition: outputjob.h:131
The SExpression class.
Definition: sexpression.h:69
SExpression * tryGetChild(const QString &path) noexcept
Try get a child by path.
Definition: sexpression.cpp:149
QList< SExpression * > getChildren(Type type) noexcept
Definition: sexpression.cpp:94
const QString & getValue() const
Definition: sexpression.cpp:71
void ensureLineBreak()
Definition: sexpression.cpp:206
static std::unique_ptr< SExpression > createToken(const QString &token)
Definition: sexpression.cpp:403
SExpression & getChild(int index)
Definition: sexpression.cpp:86
void appendChild(std::unique_ptr< SExpression > child)
Definition: sexpression.cpp:217
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
The Slot class is used to receive signals from non-QObject derived classes.
Definition: signalslot.h:170
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
Definition: occmodel.cpp:77
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition: elementname.h:84
Definition: outputjob.h:65
static ObjectSet set(const QSet< T > &set) noexcept
Definition: outputjob.h:113
ObjectSet(const ObjectSet &other)=default
void serialize(SExpression &root, const QString &key) const
Definition: outputjob.h:93
ObjectSet & operator=(const ObjectSet &rhs)=default
static ObjectSet all() noexcept
Definition: outputjob.h:109
bool operator!=(const ObjectSet< T > &rhs) const noexcept
Definition: outputjob.h:85
const QSet< T > & getSet() const noexcept
Definition: outputjob.h:92
bool mAll
Definition: outputjob.h:121
bool operator==(const ObjectSet< T > &rhs) const noexcept
Definition: outputjob.h:81
bool isDefault() const noexcept
Definition: outputjob.h:90
bool mDefault
Definition: outputjob.h:122
static ObjectSet onlyDefault() noexcept
Definition: outputjob.h:110
bool isAll() const noexcept
Definition: outputjob.h:89
QSet< T > mSet
Definition: outputjob.h:123
ObjectSet(bool all, bool onlyDefault, const QSet< T > &set)
Definition: outputjob.h:118
bool isCustom() const noexcept
Definition: outputjob.h:91
ObjectSet(const SExpression &node, const QString &childName)
Definition: outputjob.h:67
Definition: outputjob.h:182
static constexpr const char * tagname
Definition: outputjob.h:183