20#ifndef LIBREPCB_CORE_PROJECTLIBRARY_H
21#define LIBREPCB_CORE_PROJECTLIBRARY_H
26#include "../fileio/transactionaldirectory.h"
27#include "../types/uuid.h"
40class LibraryBaseElement;
89 const Uuid& compUuid)
const noexcept;
106 template <
typename ElementType>
107 void addElement(ElementType& element, QHash<Uuid, ElementType*>& elementList);
108 template <
typename ElementType>
110 QHash<Uuid, ElementType*>& elementList);
The Component class represents a "generic" device in the library.
Definition: component.h:73
The Device class represents an instance of a component (a "real" component)
Definition: device.h:55
The Package class represents a package of a component (including footprint and 3D model)
Definition: package.h:59
The ProjectLibrary class.
Definition: projectlibrary.h:52
void addComponent(Component &c)
Definition: projectlibrary.cpp:79
Package * getPackage(const Uuid &uuid) const noexcept
Definition: projectlibrary.h:77
QSet< LibraryBaseElement * > mAllElements
Definition: projectlibrary.h:121
const QHash< Uuid, Device * > & getDevices() const noexcept
Definition: projectlibrary.h:73
Symbol * getSymbol(const Uuid &uuid) const noexcept
Definition: projectlibrary.h:74
void removeSymbol(Symbol &s)
Definition: projectlibrary.cpp:87
const QHash< Uuid, Package * > & getPackages() const noexcept
Definition: projectlibrary.h:67
ProjectLibrary(const ProjectLibrary &other)=delete
void removeDevice(Device &d)
Definition: projectlibrary.cpp:99
QHash< Uuid, Device * > mDevices
Definition: projectlibrary.h:119
QHash< Uuid, Package * > mPackages
Definition: projectlibrary.h:117
void addPackage(Package &p)
Definition: projectlibrary.cpp:75
TransactionalDirectory & getDirectory() const
Definition: projectlibrary.h:63
Component * getComponent(const Uuid &uuid) const noexcept
Definition: projectlibrary.h:80
void addElement(ElementType &element, QHash< Uuid, ElementType * > &elementList)
Definition: projectlibrary.cpp:108
void addSymbol(Symbol &s)
Definition: projectlibrary.cpp:71
QHash< Uuid, Device * > getDevicesOfComponent(const Uuid &compUuid) const noexcept
Definition: projectlibrary.cpp:56
Device * getDevice(const Uuid &uuid) const noexcept
Definition: projectlibrary.h:83
void removeComponent(Component &c)
Definition: projectlibrary.cpp:95
void removePackage(Package &p)
Definition: projectlibrary.cpp:91
std::unique_ptr< TransactionalDirectory > mDirectory
Definition: projectlibrary.h:113
QHash< Uuid, Component * > mComponents
Definition: projectlibrary.h:118
ProjectLibrary & operator=(const ProjectLibrary &rhs)=delete
void addDevice(Device &d)
Definition: projectlibrary.cpp:83
void removeElement(ElementType &element, QHash< Uuid, ElementType * > &elementList)
Definition: projectlibrary.cpp:131
const QHash< Uuid, Component * > & getComponents() const noexcept
Definition: projectlibrary.h:70
QHash< Uuid, Symbol * > mSymbols
Definition: projectlibrary.h:116
const QHash< Uuid, Symbol * > & getSymbols() const noexcept
Definition: projectlibrary.h:66
~ProjectLibrary() noexcept
Definition: projectlibrary.cpp:47
The Symbol class represents the part of a component which is added to schematics.
Definition: symbol.h:55
Helper class to access a subdirectory of TransactionalFileSystem.
Definition: transactionaldirectory.h:51
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
Definition: occmodel.cpp:77