LibrePCB Developers Documentation
FileFormatMigrationV01 Class Reference

Migration to upgrade file format v0.1. More...

#include <fileformatmigrationv01.h>

+ Inheritance diagram for FileFormatMigrationV01:
+ Collaboration diagram for FileFormatMigrationV01:

Classes

struct  Component
 
struct  ComponentInstance
 
struct  ComponentSymbolVariant
 
struct  Gate
 
struct  ProjectContext
 
struct  Symbol
 
struct  Text
 

Public Member Functions

 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
 

Protected Member Functions

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

static QString toFileProofName (const QString &name, const QString &fallback) noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from FileFormatMigration
static QList< std::shared_ptr< FileFormatMigration > > getMigrations (const Version &fileFormat)
 
- Protected Attributes inherited from FileFormatMigration
Version mFromVersion
 
Version mToVersion
 

Detailed Description

Migration to upgrade file format v0.1.

Constructor & Destructor Documentation

◆ FileFormatMigrationV01() [1/2]

FileFormatMigrationV01 ( QObject *  parent = nullptr)
explicitnoexcept

◆ FileFormatMigrationV01() [2/2]

◆ ~FileFormatMigrationV01()

~FileFormatMigrationV01 ( )
virtualnoexcept

Member Function Documentation

◆ upgradeComponentCategory()

void upgradeComponentCategory ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:

◆ upgradePackageCategory()

void upgradePackageCategory ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:

◆ upgradeSymbol()

void upgradeSymbol ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradePackage()

void upgradePackage ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeComponent()

void upgradeComponent ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeDevice()

void upgradeDevice ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeLibrary()

void upgradeLibrary ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:

◆ upgradeProject()

void upgradeProject ( TransactionalDirectory dir,
QList< Message > &  messages 
)
overridevirtual

Implements FileFormatMigration.

+ Here is the call graph for this function:

◆ upgradeWorkspaceData()

void upgradeWorkspaceData ( TransactionalDirectory dir)
overridevirtual

Implements FileFormatMigration.

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:

◆ operator=()

FileFormatMigrationV01 & operator= ( const FileFormatMigrationV01 rhs)
delete

◆ createOutputJobs()

void createOutputJobs ( TransactionalDirectory dir)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeMetadata()

void upgradeMetadata ( SExpression root)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeSettings()

void upgradeSettings ( SExpression root)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeCircuit()

void upgradeCircuit ( SExpression root,
ProjectContext context 
)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeErc()

void upgradeErc ( SExpression root,
ProjectContext context 
)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeSchematic()

void upgradeSchematic ( SExpression root,
ProjectContext context 
)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeBoard()

void upgradeBoard ( SExpression root,
ProjectContext context 
)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeBoardUserSettings()

void upgradeBoardUserSettings ( SExpression root)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeBoardDesignRules()

void upgradeBoardDesignRules ( SExpression root)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeBoardDrcSettings()

void upgradeBoardDrcSettings ( SExpression root)
protectedvirtual

Reimplemented in FileFormatMigrationUnstable.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeGrid()

void upgradeGrid ( SExpression node)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeCutouts()

void upgradeCutouts ( SExpression node,
ProjectContext context 
)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeHoles()

void upgradeHoles ( SExpression node,
bool  isBoardHole 
)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeLayers()

void upgradeLayers ( SExpression node)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeInversionCharacters()

void upgradeInversionCharacters ( SExpression root,
const QString &  childName,
const QString &  valuePath 
)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upgradeStrings()

void upgradeStrings ( SExpression root)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceStrings()

void replaceStrings ( SExpression root,
const QMap< QString, QString > &  replacements 
)
protectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFileProofName()

QString toFileProofName ( const QString &  name,
const QString &  fallback 
)
staticprotectednoexcept
+ Here is the caller graph for this function:

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