LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 workspace::WorkspaceLibraryDb &db) noexcept
 
 ~LibraryElementCache () noexcept
 
std::shared_ptr< const
ComponentCategory
getComponentCategory (const Uuid &uuid) const noexcept
 
std::shared_ptr< const
PackageCategory
getPackageCategory (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 (FilePath(workspace::WorkspaceLibraryDb::*getter)(const Uuid &) const, QHash< Uuid, std::shared_ptr< const T >> &container, const Uuid &uuid) const noexcept
 

Private Attributes

QPointer< const
workspace::WorkspaceLibraryDb
mDb
 
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 ( )
delete
LibraryElementCache ( const LibraryElementCache other)
delete
LibraryElementCache ( const workspace::WorkspaceLibraryDb db)
explicitnoexcept
~LibraryElementCache ( )
noexcept

Member Function Documentation

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

LibraryElementCache& operator= ( const LibraryElementCache rhs)
delete
std::shared_ptr< const T > getElement ( FilePath(workspace::WorkspaceLibraryDb::*)(const Uuid &) const  getter,
QHash< Uuid, std::shared_ptr< const T >> &  container,
const Uuid uuid 
) const
privatenoexcept

+ Here is the call graph for this function:

Member Data Documentation

QPointer<const workspace::WorkspaceLibraryDb> mDb
private
QHash<Uuid, std::shared_ptr<const ComponentCategory> > mCmpCat
mutableprivate
QHash<Uuid, std::shared_ptr<const PackageCategory> > mPkgCat
mutableprivate
QHash<Uuid, std::shared_ptr<const Symbol> > mSym
mutableprivate
QHash<Uuid, std::shared_ptr<const Package> > mPkg
mutableprivate
QHash<Uuid, std::shared_ptr<const Component> > mCmp
mutableprivate
QHash<Uuid, std::shared_ptr<const Device> > mDev
mutableprivate

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