LibrePCB Developers Documentation
FileFormatMigrationUnstable Class Referencefinal

Migration to upgrade a previous unstable file format. More...

#include <fileformatmigrationunstable.h>

+ Inheritance diagram for FileFormatMigrationUnstable:
+ Collaboration diagram for FileFormatMigrationUnstable:

Public Member Functions

 FileFormatMigrationUnstable (QObject *parent=nullptr) noexcept
 
 FileFormatMigrationUnstable (const FileFormatMigrationUnstable &other)=delete
 
 ~FileFormatMigrationUnstable () noexcept
 
virtual void upgradeComponentCategory (TransactionalDirectory &dir) override
 
virtual void upgradePackageCategory (TransactionalDirectory &dir) override
 
virtual void upgradeSymbol (TransactionalDirectory &dir) override
 
virtual void upgradePackage (TransactionalDirectory &dir) override
 
virtual void upgradeComponent (TransactionalDirectory &dir) override
 
virtual void upgradeDevice (TransactionalDirectory &dir) override
 
virtual void upgradeLibrary (TransactionalDirectory &dir) override
 
virtual void upgradeWorkspaceData (TransactionalDirectory &dir) override
 
FileFormatMigrationUnstableoperator= (const FileFormatMigrationUnstable &rhs)=delete
 
- Public Member Functions inherited from FileFormatMigrationV01
 FileFormatMigrationV01 (QObject *parent=nullptr) noexcept
 
 FileFormatMigrationV01 (const FileFormatMigrationV01 &other)=delete
 
virtual ~FileFormatMigrationV01 () noexcept
 
virtual void upgradeComponentCategory (TransactionalDirectory &dir) override
 
virtual void upgradePackageCategory (TransactionalDirectory &dir) override
 
virtual void upgradeSymbol (TransactionalDirectory &dir) override
 
virtual void upgradePackage (TransactionalDirectory &dir) override
 
virtual void upgradeComponent (TransactionalDirectory &dir) override
 
virtual void upgradeDevice (TransactionalDirectory &dir) override
 
virtual void upgradeLibrary (TransactionalDirectory &dir) override
 
virtual void upgradeProject (TransactionalDirectory &dir, QList< Message > &messages) override
 
virtual void upgradeWorkspaceData (TransactionalDirectory &dir) override
 
FileFormatMigrationV01operator= (const FileFormatMigrationV01 &rhs)=delete
 
- Public Member Functions inherited from FileFormatMigration
 FileFormatMigration ()=delete
 
 FileFormatMigration (const Version &fromVersion, const Version &toVersion, QObject *parent=nullptr) noexcept
 
 FileFormatMigration (const FileFormatMigration &other)=delete
 
virtual ~FileFormatMigration () noexcept
 
const VersiongetFromVersion () const noexcept
 
const VersiongetToVersion () const noexcept
 
virtual void upgradeComponentCategory (TransactionalDirectory &dir)=0
 
virtual void upgradePackageCategory (TransactionalDirectory &dir)=0
 
virtual void upgradeSymbol (TransactionalDirectory &dir)=0
 
virtual void upgradePackage (TransactionalDirectory &dir)=0
 
virtual void upgradeComponent (TransactionalDirectory &dir)=0
 
virtual void upgradeDevice (TransactionalDirectory &dir)=0
 
virtual void upgradeLibrary (TransactionalDirectory &dir)=0
 
virtual void upgradeProject (TransactionalDirectory &dir, QList< Message > &messages)=0
 
virtual void upgradeWorkspaceData (TransactionalDirectory &dir)=0
 
FileFormatMigrationoperator= (const FileFormatMigration &rhs)=delete
 

Private Member Functions

virtual void createOutputJobs (TransactionalDirectory &dir) override
 
virtual void upgradeSettings (SExpression &root) override
 
virtual void upgradeCircuit (SExpression &root, ProjectContext &context) override
 
virtual void upgradeErc (SExpression &root, ProjectContext &context) override
 
virtual void upgradeSchematic (SExpression &root, ProjectContext &context) override
 
virtual void upgradeBoard (SExpression &root, ProjectContext &context) override
 
virtual void upgradeBoardUserSettings (SExpression &root) override
 
virtual void upgradeBoardDrcSettings (SExpression &root) override
 

Additional Inherited Members

- Static Public Member Functions inherited from FileFormatMigration
static QList< std::shared_ptr< FileFormatMigration > > getMigrations (const Version &fileFormat)
 
- Protected Member Functions inherited from FileFormatMigrationV01
virtual void createOutputJobs (TransactionalDirectory &dir)
 
virtual void upgradeMetadata (SExpression &root)
 
virtual void upgradeSettings (SExpression &root)
 
virtual void upgradeCircuit (SExpression &root, ProjectContext &context)
 
virtual void upgradeErc (SExpression &root, ProjectContext &context)
 
virtual void upgradeSchematic (SExpression &root, ProjectContext &context)
 
virtual void upgradeBoard (SExpression &root, ProjectContext &context)
 
virtual void upgradeBoardUserSettings (SExpression &root)
 
virtual void upgradeBoardDesignRules (SExpression &root)
 
virtual void upgradeBoardDrcSettings (SExpression &root)
 
virtual void upgradeGrid (SExpression &node)
 
virtual void upgradeCutouts (SExpression &node, ProjectContext *context)
 
virtual void upgradeHoles (SExpression &node, bool isBoardHole)
 
virtual void upgradeLayers (SExpression &node)
 
virtual void upgradeInversionCharacters (SExpression &root, const QString &childName, const QString &valuePath)
 
virtual void upgradeStrings (SExpression &root)
 
virtual void replaceStrings (SExpression &root, const QMap< QString, QString > &replacements)
 
- Protected Member Functions inherited from FileFormatMigration
Message buildMessage (Message::Severity severity, const QString &message, int affectedItems=-1) const noexcept
 
void upgradeVersionFile (TransactionalDirectory &dir, const QString &fileName)
 
- Static Protected Member Functions inherited from FileFormatMigrationV01
static QString toFileProofName (const QString &name, const QString &fallback) noexcept
 
- Protected Attributes inherited from FileFormatMigration
Version mFromVersion
 
Version mToVersion
 

Detailed Description

Migration to upgrade a previous unstable file format.

This class overrides the stable file format migration class to perform only a partial upgrade. This allows to upgrade file from the previous unstable file format (master branch) to the latest unstable file format (feature branch). This upgrade is only performed when the environment variable LIBREPCB_UPGRADE_UNSTABLE=1 is set.

Constructor & Destructor Documentation

◆ FileFormatMigrationUnstable() [1/2]

FileFormatMigrationUnstable ( QObject *  parent = nullptr)
explicitnoexcept

◆ FileFormatMigrationUnstable() [2/2]

◆ ~FileFormatMigrationUnstable()

Member Function Documentation

◆ upgradeComponentCategory()

void upgradeComponentCategory ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradePackageCategory()

void upgradePackageCategory ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeSymbol()

void upgradeSymbol ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradePackage()

void upgradePackage ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeComponent()

void upgradeComponent ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeDevice()

void upgradeDevice ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeLibrary()

void upgradeLibrary ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeWorkspaceData()

void upgradeWorkspaceData ( TransactionalDirectory dir)
overridevirtual

Reimplemented from FileFormatMigrationV01.

◆ operator=()

FileFormatMigrationUnstable & operator= ( const FileFormatMigrationUnstable rhs)
delete

◆ createOutputJobs()

void createOutputJobs ( TransactionalDirectory dir)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeSettings()

void upgradeSettings ( SExpression root)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeCircuit()

void upgradeCircuit ( SExpression root,
ProjectContext context 
)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeErc()

void upgradeErc ( SExpression root,
ProjectContext context 
)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeSchematic()

void upgradeSchematic ( SExpression root,
ProjectContext context 
)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeBoard()

void upgradeBoard ( SExpression root,
ProjectContext context 
)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeBoardUserSettings()

void upgradeBoardUserSettings ( SExpression root)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.

◆ upgradeBoardDrcSettings()

void upgradeBoardDrcSettings ( SExpression root)
overrideprivatevirtual

Reimplemented from FileFormatMigrationV01.


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