20#ifndef LIBREPCB_EDITOR_LIBRARYELEMENTCACHE_H
21#define LIBREPCB_EDITOR_LIBRARYELEMENTCACHE_H
39class ComponentCategory;
45class WorkspaceLibraryDb;
64 QObject* parent =
nullptr) noexcept;
68 void reset() noexcept;
70 const
Uuid& uuid,
bool throwIfNotFound) const;
72 const
Uuid& uuid,
bool throwIfNotFound) const;
74 bool throwIfNotFound) const;
76 bool throwIfNotFound) const;
78 bool throwIfNotFound) const;
80 bool throwIfNotFound) const;
82 const
Uuid& uuid,
bool throwIfNotFound) const;
94 QHash<
Uuid,
std::shared_ptr<const T>>& container, const
Uuid& uuid,
95 bool throwIfNotFound) const;
The ComponentCategory class.
Definition componentcategory.h:44
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 Organization class represents a PCB manufacturer, assembly house etc.
Definition organization.h:47
The PackageCategory class.
Definition packagecategory.h:44
The Package class represents a package of a component (including footprint and 3D model)
Definition package.h:59
The Symbol class represents the part of a component which is added to schematics.
Definition symbol.h:56
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The WorkspaceLibraryDb class.
Definition workspacelibrarydb.h:59
Cache for fast access to library elements.
Definition libraryelementcache.h:56
std::shared_ptr< const PackageCategory > getPackageCategory(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:98
QHash< Uuid, std::shared_ptr< const ComponentCategory > > mCmpCat
Definition libraryelementcache.h:99
QPointer< const WorkspaceLibraryDb > mDb
Definition libraryelementcache.h:98
std::shared_ptr< const T > getElement(QHash< Uuid, std::shared_ptr< const T > > &container, const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:133
std::shared_ptr< const Symbol > getSymbol(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:103
void reset() noexcept
Definition libraryelementcache.cpp:80
std::shared_ptr< const Component > getComponent(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:113
QHash< Uuid, std::shared_ptr< const Package > > mPkg
Definition libraryelementcache.h:102
LibraryElementCache(const LibraryElementCache &other)=delete
std::shared_ptr< const Device > getDevice(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:118
QHash< Uuid, std::shared_ptr< const Device > > mDev
Definition libraryelementcache.h:104
LibraryElementCache()=delete
QHash< Uuid, std::shared_ptr< const Symbol > > mSym
Definition libraryelementcache.h:101
std::shared_ptr< const ComponentCategory > getComponentCategory(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:93
QHash< Uuid, std::shared_ptr< const Component > > mCmp
Definition libraryelementcache.h:103
QHash< Uuid, std::shared_ptr< const PackageCategory > > mPkgCat
Definition libraryelementcache.h:100
std::shared_ptr< const Package > getPackage(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:108
QHash< Uuid, std::shared_ptr< const Organization > > mOrg
Definition libraryelementcache.h:105
std::shared_ptr< const Organization > getOrganization(const Uuid &uuid, bool throwIfNotFound) const
Definition libraryelementcache.cpp:123
Definition occmodel.cpp:77