Version: 9.15.0
SUIT_ShortcutHistorian::AIDSMutation Class Reference

Describes how action IDs evolved between consequtive versions of action ID sets. PS. Once upon a time I also wanted to cure AIDS. But instead I spawned new ones. With mutations. More...

Public Member Functions

 AIDSMutation (const QString &theSectionPrefixNew, const QString &theSectionPrefixOld)
 
 AIDSMutation (const QJsonObject &theJsonObject, const bool theParseMap=true)
 
const QString & getSectionPrefixOld () const
 
const QString & getSectionPrefixNew () const
 
const std::map< QString, QString > & getNewToOldActionIDMap () const
 
const std::map< QString, QString > & getOldToNewActionIDMap () const
 
bool isConcurrent (const AIDSMutation &theOther) const
 
bool merge (const AIDSMutation &theOther)
 

Static Public Member Functions

static bool isPairOfNewAndOldActionIDsValid (const QString &theSectionPrefixNew, const QString &theSectionPrefixOld)
 

Static Public Attributes

static const QString PROP_ID_MUTATIONS = "mutations"
 
static const QString PROP_ID_PREFIX_OLD = "sectionPrefixOld"
 
static const QString PROP_ID_PREFIX_NEW = "sectionPrefixNew"
 
static const QString PROP_ID_OLD_TO_NEW_ACTION_ID_MAP = "oldToNewActionIDMap"
 

Private Attributes

QString mySectionPrefixOld
 Old name prefix of a section in user preference files. More...
 
QString mySectionPrefixNew
 New name prefix of a section in user preference files. More...
 
std::map< QString, QString > myNewToOldActionIDMap
 The map only keeps changes between AIDS versions. More...
 
std::map< QString, QString > myOldToNewActionIDMap
 The map only keeps changes between AIDS versions. More...
 

Detailed Description

Describes how action IDs evolved between consequtive versions of action ID sets. PS. Once upon a time I also wanted to cure AIDS. But instead I spawned new ones. With mutations.

Constructor & Destructor Documentation

◆ AIDSMutation() [1/2]

SUIT_ShortcutHistorian::AIDSMutation::AIDSMutation ( const QString &  theSectionPrefixNew,
const QString &  theSectionPrefixOld 
)

◆ AIDSMutation() [2/2]

SUIT_ShortcutHistorian::AIDSMutation::AIDSMutation ( const QJsonObject &  theJsonObject,
const bool  theParseMap = true 
)

Member Function Documentation

◆ getNewToOldActionIDMap()

const std::map<QString, QString>& SUIT_ShortcutHistorian::AIDSMutation::getNewToOldActionIDMap ( ) const
inline

◆ getOldToNewActionIDMap()

const std::map<QString, QString>& SUIT_ShortcutHistorian::AIDSMutation::getOldToNewActionIDMap ( ) const
inline

◆ getSectionPrefixNew()

const QString& SUIT_ShortcutHistorian::AIDSMutation::getSectionPrefixNew ( ) const
inline

◆ getSectionPrefixOld()

const QString& SUIT_ShortcutHistorian::AIDSMutation::getSectionPrefixOld ( ) const
inline

◆ isConcurrent()

bool SUIT_ShortcutHistorian::AIDSMutation::isConcurrent ( const AIDSMutation theOther) const
Returns
True, if both old and new prefixes are the same as ones of theOther.

References mySectionPrefixNew, and mySectionPrefixOld.

◆ isPairOfNewAndOldActionIDsValid()

bool SUIT_ShortcutHistorian::AIDSMutation::isPairOfNewAndOldActionIDsValid ( const QString &  theSectionPrefixNew,
const QString &  theSectionPrefixOld 
)
static

References Warning().

◆ merge()

bool SUIT_ShortcutHistorian::AIDSMutation::merge ( const AIDSMutation theOther)
Returns
True, if mutation maps are augmented.

References myOldToNewActionIDMap, and Warning().

Member Data Documentation

◆ myNewToOldActionIDMap

std::map<QString, QString> SUIT_ShortcutHistorian::AIDSMutation::myNewToOldActionIDMap
private

The map only keeps changes between AIDS versions.

It means, there is no need to add entries like {theSameActionID, theSameActionID}. New action ID can't be empty.

◆ myOldToNewActionIDMap

std::map<QString, QString> SUIT_ShortcutHistorian::AIDSMutation::myOldToNewActionIDMap
private

The map only keeps changes between AIDS versions.

It means, there is no need to add entries like {theSameActionID, theSameActionID}. New action ID may be empty.

◆ mySectionPrefixNew

QString SUIT_ShortcutHistorian::AIDSMutation::mySectionPrefixNew
private

New name prefix of a section in user preference files.

◆ mySectionPrefixOld

QString SUIT_ShortcutHistorian::AIDSMutation::mySectionPrefixOld
private

Old name prefix of a section in user preference files.

◆ PROP_ID_MUTATIONS

const QString SUIT_ShortcutHistorian::AIDSMutation::PROP_ID_MUTATIONS = "mutations"
static

◆ PROP_ID_OLD_TO_NEW_ACTION_ID_MAP

const QString SUIT_ShortcutHistorian::AIDSMutation::PROP_ID_OLD_TO_NEW_ACTION_ID_MAP = "oldToNewActionIDMap"
static

◆ PROP_ID_PREFIX_NEW

const QString SUIT_ShortcutHistorian::AIDSMutation::PROP_ID_PREFIX_NEW = "sectionPrefixNew"
static

◆ PROP_ID_PREFIX_OLD

const QString SUIT_ShortcutHistorian::AIDSMutation::PROP_ID_PREFIX_OLD = "sectionPrefixOld"
static

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