LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
< TransactionalDirectory
mDirectory
 
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 ( std::unique_ptr< TransactionalDirectory directory)
~ProjectLibrary ( )
noexcept
ProjectLibrary ( )
private
ProjectLibrary ( const ProjectLibrary other)
private

Member Function Documentation

const QHash<Uuid, library::Symbol*>& getSymbols ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QHash<Uuid, library::Package*>& getPackages ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QHash<Uuid, library::Component*>& getComponents ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QHash<Uuid, library::Device*>& getDevices ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

library::Symbol* getSymbol ( const Uuid uuid) const
inlinenoexcept

+ Here is the caller graph for this function:

library::Package* getPackage ( const Uuid uuid) const
inlinenoexcept

+ Here is the caller graph for this function:

library::Component* getComponent ( const Uuid uuid) const
inlinenoexcept

+ Here is the caller graph for this function:

library::Device* getDevice ( const Uuid uuid) const
inlinenoexcept

+ Here is the caller graph for this function:

QHash< Uuid, library::Device * > getDevicesOfComponent ( const Uuid compUuid) const
noexcept

+ Here is the call graph for this function:

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 ( )

+ Here is the call graph for this function:

ProjectLibrary& operator= ( const ProjectLibrary rhs)
private
void loadElements ( const QString &  dirname,
const QString &  type,
QHash< Uuid, ElementType * > &  elementList 
)
private
void addElement ( ElementType &  element,
QHash< Uuid, ElementType * > &  elementList 
)
private
void removeElement ( ElementType &  element,
QHash< Uuid, ElementType * > &  elementList 
)
private

+ Here is the call graph for this function:

Member Data Documentation

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

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