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

Public Member Functions

 Diff ()
 
 Diff (QList< GenericNode * > &nodesA, std::shared_ptr< GenericTree > treeA, QList< GenericNode * > &nodesB, std::shared_ptr< GenericTree > treeB, const GitRepository *)
 
IdToChangeDescriptionHash changes () const
 
IdToChangeDescriptionHash changes (ChangeType type) const
 
IdToChangeDescriptionHash changes (ChangeType type, ChangeDescription::UpdateFlags flags) const
 
std::shared_ptr< GenericTreetreeA () const
 
std::shared_ptr< GenericTreetreeB () const
 

Private Member Functions

void computeChanges (IdToGenericNodeHash &nodesA, IdToGenericNodeHash &nodesB)
 
void computeStructChanges ()
 Sets structFlag for appropriate changes and may create new changes. More...
 
void filterPersistenceUnits (IdToGenericNodeHash &nodes)
 Removes all nodes that are used for persistent unit linking from nodes. More...
 
void setStructureFlagForId (Model::NodeIdType id, std::shared_ptr< ChangeDescription > causingChange)
 If a change for id already exists, its structFlag is set, otherwise a new change with that flag is created. More...
 

Private Attributes

IdToChangeDescriptionHash changeDescriptions_ {}
 
std::shared_ptr< GenericTreetreeA_ {}
 
std::shared_ptr< GenericTreetreeB_ {}
 

Constructor & Destructor Documentation

◆ Diff() [1/2]

FilePersistence::Diff::Diff ( )

◆ Diff() [2/2]

FilePersistence::Diff::Diff ( QList< GenericNode * > &  nodesA,
std::shared_ptr< GenericTree treeA,
QList< GenericNode * > &  nodesB,
std::shared_ptr< GenericTree treeB,
const GitRepository  
)

Member Function Documentation

◆ changes() [1/3]

IdToChangeDescriptionHash FilePersistence::Diff::changes ( ) const
inline

◆ changes() [2/3]

IdToChangeDescriptionHash FilePersistence::Diff::changes ( ChangeType  type) const

◆ changes() [3/3]

IdToChangeDescriptionHash FilePersistence::Diff::changes ( ChangeType  type,
ChangeDescription::UpdateFlags  flags 
) const

◆ computeChanges()

void FilePersistence::Diff::computeChanges ( IdToGenericNodeHash nodesA,
IdToGenericNodeHash nodesB 
)
private

◆ computeStructChanges()

void FilePersistence::Diff::computeStructChanges ( )
private

Sets structFlag for appropriate changes and may create new changes.

◆ filterPersistenceUnits()

void FilePersistence::Diff::filterPersistenceUnits ( IdToGenericNodeHash nodes)
private

Removes all nodes that are used for persistent unit linking from nodes.

◆ setStructureFlagForId()

void FilePersistence::Diff::setStructureFlagForId ( Model::NodeIdType  id,
std::shared_ptr< ChangeDescription causingChange 
)
private

If a change for id already exists, its structFlag is set, otherwise a new change with that flag is created.

◆ treeA()

std::shared_ptr< GenericTree > FilePersistence::Diff::treeA ( ) const
inline

◆ treeB()

std::shared_ptr< GenericTree > FilePersistence::Diff::treeB ( ) const
inline

Member Data Documentation

◆ changeDescriptions_

IdToChangeDescriptionHash FilePersistence::Diff::changeDescriptions_ {}
private

◆ treeA_

std::shared_ptr<GenericTree> FilePersistence::Diff::treeA_ {}
private

◆ treeB_

std::shared_ptr<GenericTree> FilePersistence::Diff::treeB_ {}
private