LibrePCB Developers Documentation
ProjectLibrary Class Referencefinal

The ProjectLibrary class. More...

#include <projectlibrary.h>

Inherits QObject.

+ Collaboration diagram for ProjectLibrary:

Public Member Functions

 ProjectLibrary (std::unique_ptr< TransactionalDirectory > directory)
 
 ~ProjectLibrary () noexcept
 
const QHash< Uuid, library::Symbol * > & getSymbols () const noexcept
 
const QHash< Uuid, library::Package * > & getPackages () const noexcept
 
const QHash< Uuid, library::Component * > & getComponents () const noexcept
 
const QHash< Uuid, library::Device * > & getDevices () const noexcept
 
library::SymbolgetSymbol (const Uuid &uuid) const noexcept
 
library::PackagegetPackage (const Uuid &uuid) const noexcept
 
library::ComponentgetComponent (const Uuid &uuid) const noexcept
 
library::DevicegetDevice (const Uuid &uuid) const noexcept
 
QHash< Uuid, library::Device * > getDevicesOfComponent (const Uuid &compUuid) const noexcept
 
void addSymbol (library::Symbol &s)
 
void addPackage (library::Package &p)
 
void addComponent (library::Component &c)
 
void addDevice (library::Device &d)
 
void removeSymbol (library::Symbol &s)
 
void removePackage (library::Package &p)
 
void removeComponent (library::Component &c)
 
void removeDevice (library::Device &d)
 
void save ()
 

Private Member Functions

 ProjectLibrary ()
 
 ProjectLibrary (const ProjectLibrary &other)
 
ProjectLibraryoperator= (const ProjectLibrary &rhs)
 
template<typename ElementType >
void loadElements (const QString &dirname, const QString &type, QHash< Uuid, ElementType *> &elementList)
 
template<typename ElementType >
void addElement (ElementType &element, QHash< Uuid, ElementType *> &elementList)
 
template<typename ElementType >
void removeElement (ElementType &element, QHash< Uuid, ElementType *> &elementList)
 

Private Attributes

std::unique_ptr< TransactionalDirectorymDirectory
 
QHash< Uuid, library::Symbol * > mSymbols
 
QHash< Uuid, library::Package * > mPackages
 
QHash< Uuid, library::Component * > mComponents
 
QHash< Uuid, library::Device * > mDevices
 
QSet< library::LibraryBaseElement * > mAllElements
 
QSet< library::LibraryBaseElement * > mElementsToUpgrade
 

Detailed Description

The ProjectLibrary class.

Constructor & Destructor Documentation

◆ ProjectLibrary() [1/3]

ProjectLibrary ( std::unique_ptr< TransactionalDirectory directory)

◆ ~ProjectLibrary()

~ProjectLibrary ( )
noexcept

◆ ProjectLibrary() [2/3]

ProjectLibrary ( )
private

◆ ProjectLibrary() [3/3]

ProjectLibrary ( const ProjectLibrary other)
private

Member Function Documentation

◆ getSymbols()

const QHash<Uuid, library::Symbol*>& getSymbols ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPackages()

const QHash<Uuid, library::Package*>& getPackages ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getComponents()

const QHash<Uuid, library::Component*>& getComponents ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDevices()

const QHash<Uuid, library::Device*>& getDevices ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getSymbol()

library::Symbol* getSymbol ( const Uuid uuid) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPackage()

library::Package* getPackage ( const Uuid uuid) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getComponent()

library::Component* getComponent ( const Uuid uuid) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDevice()

library::Device* getDevice ( const Uuid uuid) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDevicesOfComponent()

QHash< Uuid, library::Device * > getDevicesOfComponent ( const Uuid compUuid) const
noexcept
+ Here is the call graph for this function:

◆ addSymbol()

void addSymbol ( library::Symbol s)

◆ addPackage()

void addPackage ( library::Package p)

◆ addComponent()

void addComponent ( library::Component c)

◆ addDevice()

void addDevice ( library::Device d)

◆ removeSymbol()

void removeSymbol ( library::Symbol s)

◆ removePackage()

void removePackage ( library::Package p)

◆ removeComponent()

void removeComponent ( library::Component c)

◆ removeDevice()

void removeDevice ( library::Device d)

◆ save()

void save ( )
+ Here is the call graph for this function:

◆ operator=()

ProjectLibrary& operator= ( const ProjectLibrary rhs)
private

◆ loadElements()

void loadElements ( const QString &  dirname,
const QString &  type,
QHash< Uuid, ElementType *> &  elementList 
)
private

◆ addElement()

void addElement ( ElementType &  element,
QHash< Uuid, ElementType *> &  elementList 
)
private

◆ removeElement()

void removeElement ( ElementType &  element,
QHash< Uuid, ElementType *> &  elementList 
)
private
+ Here is the call graph for this function:

Member Data Documentation

◆ mDirectory

std::unique_ptr<TransactionalDirectory> mDirectory
private

◆ mSymbols

QHash<Uuid, library::Symbol*> mSymbols
private

◆ mPackages

QHash<Uuid, library::Package*> mPackages
private

◆ mComponents

QHash<Uuid, library::Component*> mComponents
private

◆ mDevices

QHash<Uuid, library::Device*> mDevices
private

◆ mAllElements

QSet<library::LibraryBaseElement*> mAllElements
private

◆ mElementsToUpgrade

QSet<library::LibraryBaseElement*> mElementsToUpgrade
private

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