LibrePCB Developers Documentation
LibraryElementCache Class Referencefinal

Cache for fast access to library elements. More...

#include <libraryelementcache.h>

+ Collaboration diagram for LibraryElementCache:

Public Member Functions

 LibraryElementCache ()=delete
 
 LibraryElementCache (const LibraryElementCache &other)=delete
 
 LibraryElementCache (const WorkspaceLibraryDb &db) noexcept
 
 ~LibraryElementCache () noexcept
 
std::shared_ptr< const ComponentCategorygetComponentCategory (const Uuid &uuid) const noexcept
 
std::shared_ptr< const PackageCategorygetPackageCategory (const Uuid &uuid) const noexcept
 
std::shared_ptr< const SymbolgetSymbol (const Uuid &uuid) const noexcept
 
std::shared_ptr< const PackagegetPackage (const Uuid &uuid) const noexcept
 
std::shared_ptr< const ComponentgetComponent (const Uuid &uuid) const noexcept
 
std::shared_ptr< const DevicegetDevice (const Uuid &uuid) const noexcept
 
LibraryElementCacheoperator= (const LibraryElementCache &rhs)=delete
 

Private Member Functions

template<typename T >
std::shared_ptr< const T > getElement (QHash< Uuid, std::shared_ptr< const T > > &container, const Uuid &uuid) const noexcept
 

Private Attributes

QPointer< const WorkspaceLibraryDbmDb
 
QHash< Uuid, std::shared_ptr< const ComponentCategory > > mCmpCat
 
QHash< Uuid, std::shared_ptr< const PackageCategory > > mPkgCat
 
QHash< Uuid, std::shared_ptr< const Symbol > > mSym
 
QHash< Uuid, std::shared_ptr< const Package > > mPkg
 
QHash< Uuid, std::shared_ptr< const Component > > mCmp
 
QHash< Uuid, std::shared_ptr< const Device > > mDev
 

Detailed Description

Cache for fast access to library elements.

Constructor & Destructor Documentation

◆ LibraryElementCache() [1/3]

LibraryElementCache ( )
delete

◆ LibraryElementCache() [2/3]

LibraryElementCache ( const LibraryElementCache other)
delete

◆ LibraryElementCache() [3/3]

LibraryElementCache ( const WorkspaceLibraryDb db)
explicitnoexcept

◆ ~LibraryElementCache()

~LibraryElementCache ( )
noexcept

Member Function Documentation

◆ getComponentCategory()

std::shared_ptr< const ComponentCategory > getComponentCategory ( const Uuid uuid) const
noexcept

◆ getPackageCategory()

std::shared_ptr< const PackageCategory > getPackageCategory ( const Uuid uuid) const
noexcept

◆ getSymbol()

std::shared_ptr< const Symbol > getSymbol ( const Uuid uuid) const
noexcept

◆ getPackage()

std::shared_ptr< const Package > getPackage ( const Uuid uuid) const
noexcept

◆ getComponent()

std::shared_ptr< const Component > getComponent ( const Uuid uuid) const
noexcept

◆ getDevice()

std::shared_ptr< const Device > getDevice ( const Uuid uuid) const
noexcept

◆ operator=()

LibraryElementCache & operator= ( const LibraryElementCache rhs)
delete

◆ getElement()

std::shared_ptr< const T > getElement ( QHash< Uuid, std::shared_ptr< const T > > &  container,
const Uuid uuid 
) const
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mDb

QPointer<const WorkspaceLibraryDb> mDb
private

◆ mCmpCat

QHash<Uuid, std::shared_ptr<const ComponentCategory> > mCmpCat
mutableprivate

◆ mPkgCat

QHash<Uuid, std::shared_ptr<const PackageCategory> > mPkgCat
mutableprivate

◆ mSym

QHash<Uuid, std::shared_ptr<const Symbol> > mSym
mutableprivate

◆ mPkg

QHash<Uuid, std::shared_ptr<const Package> > mPkg
mutableprivate

◆ mCmp

QHash<Uuid, std::shared_ptr<const Component> > mCmp
mutableprivate

◆ mDev

QHash<Uuid, std::shared_ptr<const Device> > mDev
mutableprivate

The documentation for this class was generated from the following files: