20 #ifndef LIBREPCB_LIBRARY_LIBRARYELEMENTCACHE_H
21 #define LIBREPCB_LIBRARY_LIBRARYELEMENTCACHE_H
71 const Uuid& uuid)
const noexcept;
73 const Uuid& uuid)
const noexcept;
74 std::shared_ptr<const Symbol>
getSymbol(
const Uuid& uuid)
const noexcept;
75 std::shared_ptr<const Package>
getPackage(
const Uuid& uuid)
const noexcept;
78 std::shared_ptr<const Device>
getDevice(
const Uuid& uuid)
const noexcept;
87 QHash<
Uuid, std::shared_ptr<const T>>& container,
const Uuid& uuid)
const
91 QPointer<const workspace::WorkspaceLibraryDb>
mDb;
92 mutable QHash<Uuid, std::shared_ptr<const ComponentCategory>>
mCmpCat;
93 mutable QHash<Uuid, std::shared_ptr<const PackageCategory>>
mPkgCat;
94 mutable QHash<Uuid, std::shared_ptr<const Symbol>>
mSym;
95 mutable QHash<Uuid, std::shared_ptr<const Package>>
mPkg;
96 mutable QHash<Uuid, std::shared_ptr<const Component>>
mCmp;
97 mutable QHash<Uuid, std::shared_ptr<const Device>>
mDev;
107 #endif // LIBREPCB_LIBRARY_LIBRARYELEMENTCACHE_H
QHash< Uuid, std::shared_ptr< const Device > > mDev
Definition: libraryelementcache.h:97
The ComponentCategory class.
Definition: componentcategory.h:43
std::shared_ptr< const PackageCategory > getPackageCategory(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:60
std::shared_ptr< const Component > getComponent(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:78
The Package class represents a package of a component (including footprint and 3D model) ...
Definition: package.h:56
The Device class represents an instance of a component (a "real" component)
Definition: device.h:54
QHash< Uuid, std::shared_ptr< const Symbol > > mSym
Definition: libraryelementcache.h:94
QHash< Uuid, std::shared_ptr< const Package > > mPkg
Definition: libraryelementcache.h:95
QHash< Uuid, std::shared_ptr< const ComponentCategory > > mCmpCat
Definition: libraryelementcache.h:92
QHash< Uuid, std::shared_ptr< const PackageCategory > > mPkgCat
Definition: libraryelementcache.h:93
Cache for fast access to library elements.
Definition: libraryelementcache.h:58
LibraryElementCache()=delete
The Symbol class represents the part of a component which is added to schematics. ...
Definition: symbol.h:57
std::shared_ptr< const Device > getDevice(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:84
LibraryElementCache & operator=(const LibraryElementCache &rhs)=delete
QPointer< const workspace::WorkspaceLibraryDb > mDb
Definition: libraryelementcache.h:91
std::shared_ptr< const ComponentCategory > getComponentCategory(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:55
~LibraryElementCache() noexcept
Definition: libraryelementcache.cpp:47
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:127
QHash< Uuid, std::shared_ptr< const Component > > mCmp
Definition: libraryelementcache.h:96
std::shared_ptr< const Symbol > getSymbol(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:66
std::shared_ptr< const T > getElement(FilePath(workspace::WorkspaceLibraryDb::*getter)(const Uuid &) const, QHash< Uuid, std::shared_ptr< const T >> &container, const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:95
The WorkspaceLibraryDb class.
Definition: workspacelibrarydb.h:52
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
The PackageCategory class.
Definition: packagecategory.h:43
The Component class represents a "generic" device in the library.
Definition: component.h:73
std::shared_ptr< const Package > getPackage(const Uuid &uuid) const noexcept
Definition: libraryelementcache.cpp:72