LibrePCB Developers Documentation
Loading...
Searching...
No Matches
FileFormatMigration Class Referenceabstract

Base class for any file format migration. More...

#include <fileformatmigration.h>

+ Inheritance diagram for FileFormatMigration:
+ Collaboration diagram for FileFormatMigration:

Classes

struct  Message
 

Public Member Functions

 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
 

Static Public Member Functions

static QList< std::shared_ptr< FileFormatMigration > > getMigrations (const Version &fileFormat)
 

Protected Member Functions

Message buildMessage (Message::Severity severity, const QString &message, int affectedItems=-1) const noexcept
 
void upgradeVersionFile (TransactionalDirectory &dir, const QString &fileName)
 

Protected Attributes

Version mFromVersion
 
Version mToVersion
 

Detailed Description

Base class for any file format migration.

Constructor & Destructor Documentation

◆ FileFormatMigration() [1/3]

FileFormatMigration ( )
delete

◆ FileFormatMigration() [2/3]

FileFormatMigration ( const Version fromVersion,
const Version toVersion,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ FileFormatMigration() [3/3]

FileFormatMigration ( const FileFormatMigration other)
delete

◆ ~FileFormatMigration()

~FileFormatMigration ( )
virtualnoexcept

Member Function Documentation

◆ getFromVersion()

const Version & getFromVersion ( ) const
inlinenoexcept

◆ getToVersion()

const Version & getToVersion ( ) const
inlinenoexcept

◆ upgradeComponentCategory()

virtual void upgradeComponentCategory ( TransactionalDirectory dir)
pure virtual

◆ upgradePackageCategory()

virtual void upgradePackageCategory ( TransactionalDirectory dir)
pure virtual

◆ upgradeSymbol()

virtual void upgradeSymbol ( TransactionalDirectory dir)
pure virtual

◆ upgradePackage()

virtual void upgradePackage ( TransactionalDirectory dir)
pure virtual

◆ upgradeComponent()

virtual void upgradeComponent ( TransactionalDirectory dir)
pure virtual

◆ upgradeDevice()

virtual void upgradeDevice ( TransactionalDirectory dir)
pure virtual

◆ upgradeLibrary()

virtual void upgradeLibrary ( TransactionalDirectory dir)
pure virtual

◆ upgradeProject()

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

◆ upgradeWorkspaceData()

virtual void upgradeWorkspaceData ( TransactionalDirectory dir)
pure virtual

◆ getMigrations()

QList< std::shared_ptr< FileFormatMigration > > getMigrations ( const Version fileFormat)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

FileFormatMigration & operator= ( const FileFormatMigration rhs)
delete

◆ buildMessage()

FileFormatMigration::Message buildMessage ( Message::Severity  severity,
const QString &  message,
int  affectedItems = -1 
) const
protectednoexcept
+ Here is the caller graph for this function:

◆ upgradeVersionFile()

void upgradeVersionFile ( TransactionalDirectory dir,
const QString &  fileName 
)
protected
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mFromVersion

Version mFromVersion
protected

◆ mToVersion

Version mToVersion
protected

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