Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
FilePersistence::Dependencies Class Reference

Public Member Functions

 Dependencies (const QList< MergeChange * > &changes, const QMultiHash< Model::NodeIdType, MergeChange * > &changesForNode, const QMultiHash< Model::NodeIdType, MergeChange * > &changesForChildren)
 
QList< MergeChange * > changesDependingOn (MergeChange *independentChange) const
 
void copyDependencies (MergeChange *sourceChange, MergeChange *destinationChange)
 
QList< MergeChange * > dependenciesOf (MergeChange *dependentChange) const
 
bool hasDependencies (MergeChange *change) const
 
void insert (MergeChange *dependentChange, MergeChange *independentChange)
 
void recomputeAll (GenericTree *tree)
 
void remove (MergeChange *dependentChange, MergeChange *independentChange)
 
void removeAll (MergeChange *change)
 
bool removeDependenciesForSafeMoveChanges (const Conflicts &directConflicts, GenericTree *tree)
 Removes the dependencies of some move changes, which are safe to apply, despite depending on other moves. More...
 
bool removeDependenciesInsideNonConflictingAtomicCycles (const Conflicts &directConflicts)
 Scans all changes to detect all-or-nothing dependency chains and removese the depenencies if all elements are non-conflicting and if they don't depend on external elements. More...
 

Private Member Functions

void addChildrenRemovedDependency (MergeChange *change, GenericTree *tree)
 
void addDependencies (MergeChange *change, GenericTree *tree)
 
void addLabelDependency (MergeChange *change)
 
void addMoveDependency (MergeChange *change, GenericTree *tree)
 
void addParentPresentDependency (MergeChange *change, GenericTree *tree)
 

Private Attributes

const QList< MergeChange * > & changes_
 
const QMultiHash< Model::NodeIdType, MergeChange * > & changesForChildren_
 
const QMultiHash< Model::NodeIdType, MergeChange * > & changesForNode_
 
QMultiHash< MergeChange *, MergeChange * > dependencies_
 
QMultiHash< MergeChange *, MergeChange * > reverseDependencies_
 

Constructor & Destructor Documentation

◆ Dependencies()

FilePersistence::Dependencies::Dependencies ( const QList< MergeChange * > &  changes,
const QMultiHash< Model::NodeIdType, MergeChange * > &  changesForNode,
const QMultiHash< Model::NodeIdType, MergeChange * > &  changesForChildren 
)

Member Function Documentation

◆ addChildrenRemovedDependency()

void FilePersistence::Dependencies::addChildrenRemovedDependency ( MergeChange change,
GenericTree tree 
)
private

◆ addDependencies()

void FilePersistence::Dependencies::addDependencies ( MergeChange change,
GenericTree tree 
)
private

◆ addLabelDependency()

void FilePersistence::Dependencies::addLabelDependency ( MergeChange change)
private

◆ addMoveDependency()

void FilePersistence::Dependencies::addMoveDependency ( MergeChange change,
GenericTree tree 
)
private

◆ addParentPresentDependency()

void FilePersistence::Dependencies::addParentPresentDependency ( MergeChange change,
GenericTree tree 
)
private

◆ changesDependingOn()

QList< MergeChange * > FilePersistence::Dependencies::changesDependingOn ( MergeChange independentChange) const
inline

◆ copyDependencies()

void FilePersistence::Dependencies::copyDependencies ( MergeChange sourceChange,
MergeChange destinationChange 
)

◆ dependenciesOf()

QList< MergeChange * > FilePersistence::Dependencies::dependenciesOf ( MergeChange dependentChange) const
inline

◆ hasDependencies()

bool FilePersistence::Dependencies::hasDependencies ( MergeChange change) const
inline

◆ insert()

void FilePersistence::Dependencies::insert ( MergeChange dependentChange,
MergeChange independentChange 
)
inline

◆ recomputeAll()

void FilePersistence::Dependencies::recomputeAll ( GenericTree tree)

◆ remove()

void FilePersistence::Dependencies::remove ( MergeChange dependentChange,
MergeChange independentChange 
)
inline

◆ removeAll()

void FilePersistence::Dependencies::removeAll ( MergeChange change)

◆ removeDependenciesForSafeMoveChanges()

bool FilePersistence::Dependencies::removeDependenciesForSafeMoveChanges ( const Conflicts directConflicts,
GenericTree tree 
)

Removes the dependencies of some move changes, which are safe to apply, despite depending on other moves.

For now these are only move changes that both branches perform.

Returns whether any dependencies were removed

◆ removeDependenciesInsideNonConflictingAtomicCycles()

bool FilePersistence::Dependencies::removeDependenciesInsideNonConflictingAtomicCycles ( const Conflicts directConflicts)

Scans all changes to detect all-or-nothing dependency chains and removese the depenencies if all elements are non-conflicting and if they don't depend on external elements.

Returns true if any dependencies were removed.

Member Data Documentation

◆ changes_

const QList<MergeChange*>& FilePersistence::Dependencies::changes_
private

◆ changesForChildren_

const QMultiHash<Model::NodeIdType, MergeChange*>& FilePersistence::Dependencies::changesForChildren_
private

◆ changesForNode_

const QMultiHash<Model::NodeIdType, MergeChange*>& FilePersistence::Dependencies::changesForNode_
private

◆ dependencies_

QMultiHash<MergeChange*, MergeChange*> FilePersistence::Dependencies::dependencies_
private

◆ reverseDependencies_

QMultiHash<MergeChange*, MergeChange*> FilePersistence::Dependencies::reverseDependencies_
private