LibrePCB Developers Documentation
ProjectLibrary Class Referencefinal

The ProjectLibrary class. More...

#include <projectlibrary.h>

Inherits QObject.

+ Collaboration diagram for ProjectLibrary:

Public Member Functions

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

Private Member Functions

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, Symbol * > mSymbols
 
QHash< Uuid, Package * > mPackages
 
QHash< Uuid, Component * > mComponents
 
QHash< Uuid, Device * > mDevices
 
QSet< LibraryBaseElement * > mAllElements
 

Detailed Description

The ProjectLibrary class.

Constructor & Destructor Documentation

◆ ProjectLibrary() [1/3]

ProjectLibrary ( )
delete

◆ ProjectLibrary() [2/3]

ProjectLibrary ( const ProjectLibrary other)
delete

◆ ProjectLibrary() [3/3]

ProjectLibrary ( std::unique_ptr< TransactionalDirectory directory)

◆ ~ProjectLibrary()

~ProjectLibrary ( )
noexcept

Member Function Documentation

◆ getDirectory()

TransactionalDirectory & getDirectory ( ) const
inline
+ Here is the caller graph for this function:

◆ getSymbols()

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

◆ getPackages()

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

◆ getComponents()

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

◆ getDevices()

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

◆ getSymbol()

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

◆ getPackage()

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

◆ getComponent()

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

◆ getDevice()

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

◆ getDevicesOfComponent()

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

◆ addSymbol()

void addSymbol ( Symbol s)
+ Here is the caller graph for this function:

◆ addPackage()

void addPackage ( Package p)
+ Here is the caller graph for this function:

◆ addComponent()

void addComponent ( Component c)
+ Here is the caller graph for this function:

◆ addDevice()

void addDevice ( Device d)
+ Here is the caller graph for this function:

◆ removeSymbol()

void removeSymbol ( Symbol s)

◆ removePackage()

void removePackage ( Package p)

◆ removeComponent()

void removeComponent ( Component c)

◆ removeDevice()

void removeDevice ( Device d)

◆ operator=()

ProjectLibrary & operator= ( const ProjectLibrary rhs)
delete

◆ addElement()

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

◆ removeElement()

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

Member Data Documentation

◆ mDirectory

std::unique_ptr<TransactionalDirectory> mDirectory
private

◆ mSymbols

QHash<Uuid, Symbol*> mSymbols
private

◆ mPackages

QHash<Uuid, Package*> mPackages
private

◆ mComponents

QHash<Uuid, Component*> mComponents
private

◆ mDevices

QHash<Uuid, Device*> mDevices
private

◆ mAllElements

QSet<LibraryBaseElement*> mAllElements
private

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