20 #ifndef LIBREPCB_EDITOR_LIBRARYELEMENTCACHE_H 21 #define LIBREPCB_EDITOR_LIBRARYELEMENTCACHE_H 39 class ComponentCategory;
42 class PackageCategory;
44 class WorkspaceLibraryDb;
67 const Uuid& uuid)
const noexcept;
69 const Uuid& uuid)
const noexcept;
70 std::shared_ptr<const Symbol>
getSymbol(
const Uuid& uuid)
const noexcept;
71 std::shared_ptr<const Package>
getPackage(
const Uuid& uuid)
const noexcept;
73 const Uuid& uuid)
const noexcept;
74 std::shared_ptr<const Device>
getDevice(
const Uuid& uuid)
const noexcept;
82 QHash<
Uuid, std::shared_ptr<const T>>& container,
83 const Uuid& uuid)
const noexcept;
86 QPointer<const WorkspaceLibraryDb>
mDb;
87 mutable QHash<Uuid, std::shared_ptr<const ComponentCategory>>
mCmpCat;
88 mutable QHash<Uuid, std::shared_ptr<const PackageCategory>>
mPkgCat;
89 mutable QHash<Uuid, std::shared_ptr<const Symbol>>
mSym;
90 mutable QHash<Uuid, std::shared_ptr<const Package>>
mPkg;
91 mutable QHash<Uuid, std::shared_ptr<const Component>>
mCmp;
92 mutable QHash<Uuid, std::shared_ptr<const Device>>
mDev;
std::shared_ptr< const Device > getDevice(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:84
std::shared_ptr< const Component > getComponent(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:79
LibraryElementCache()=delete
QHash< Uuid, std::shared_ptr< const Component > > mCmp
Definition: libraryelementcache.h:91
Definition: occmodel.cpp:77
std::shared_ptr< const ComponentCategory > getComponentCategory(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:60
QHash< Uuid, std::shared_ptr< const ComponentCategory > > mCmpCat
Definition: libraryelementcache.h:87
std::shared_ptr< const PackageCategory > getPackageCategory(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:64
Cache for fast access to library elements.
Definition: libraryelementcache.h:55
std::shared_ptr< const Package > getPackage(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:74
std::shared_ptr< const T > getElement(QHash< Uuid, std::shared_ptr< const T >> &container, const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:94
LibraryElementCache & operator=(const LibraryElementCache &rhs)=delete
QHash< Uuid, std::shared_ptr< const Symbol > > mSym
Definition: libraryelementcache.h:89
QHash< Uuid, std::shared_ptr< const PackageCategory > > mPkgCat
Definition: libraryelementcache.h:88
std::shared_ptr< const Symbol > getSymbol(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:69
QPointer< const WorkspaceLibraryDb > mDb
Definition: libraryelementcache.h:86
QHash< Uuid, std::shared_ptr< const Package > > mPkg
Definition: libraryelementcache.h:90
QHash< Uuid, std::shared_ptr< const Device > > mDev
Definition: libraryelementcache.h:92
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
The WorkspaceLibraryDb class.
Definition: workspacelibrarydb.h:57
~LibraryElementCache() noexcept
Definition: libraryelementcache.cpp:52