Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SalomeApp_DataModelSync Class Reference

Public Member Functions

 SalomeApp_DataModelSync (_PTR(Study), SUIT_DataObject *)
 
bool isEqual (const kerPtr &, const suitPtr &) const
 
kerPtr nullSrc () const
 
suitPtr nullTrg () const
 
suitPtr createItem (const kerPtr &, const suitPtr &, const suitPtr &) const
 
void updateItem (const kerPtr &, const suitPtr &) const
 
void deleteItemWithChildren (const suitPtr &) const
 
QList< kerPtr > children (const kerPtr &) const
 
QList< suitPtrchildren (const suitPtr &) const
 
suitPtr parent (const suitPtr &) const
 

Private Member Functions

bool isCorrect (const kerPtr &) const
 
 _PTR (Study) myStudy
 

Private Attributes

SUIT_DataObjectmyRoot
 

Detailed Description

Auxiliary class for synchronizing tree of kernel objects and SUIT_DataObjects

Constructor & Destructor Documentation

SalomeApp_DataModelSync::SalomeApp_DataModelSync ( _PTR(Study)  aStudy,
SUIT_DataObject aRoot 
)

Constructor

Member Function Documentation

SalomeApp_DataModelSync::_PTR ( Study  )
private
QList< kerPtr > SalomeApp_DataModelSync::children ( const kerPtr &  obj) const

Fills list with children of kernel object

Parameters
obj- kernel object
ch- list to be filled

References _PTR().

QList< suitPtr > SalomeApp_DataModelSync::children ( const suitPtr p) const

Fills list with children of SUIT object

Parameters
p- SUIT object
ch- list to be filled

References SUIT_DataObject::children().

suitPtr SalomeApp_DataModelSync::createItem ( const kerPtr &  so,
const suitPtr parent,
const suitPtr after 
) const

Creates SUIT object by KERNEL object

Parameters
so- corresponding KERNEL object
parent- parent for SUIT object
after- previous sibling for SUIT object
prepend- SUIT object must be added to start of children list

References _PTR(), SUIT_DataObject::appendChild(), SUIT_DataObject::childPos(), SUIT_DataObject::insertChild(), isCorrect(), and myRoot.

void SalomeApp_DataModelSync::deleteItemWithChildren ( const suitPtr p) const

Deletes object with all children

Parameters
p- SUIT object

References SUIT_DataObject::children().

bool SalomeApp_DataModelSync::isCorrect ( const kerPtr &  so) const
private
Returns
true if kernel object is correct (has non empty name or is reference)

References _PTR().

bool SalomeApp_DataModelSync::isEqual ( const kerPtr &  p,
const suitPtr q 
) const
Returns
true if objects correspond each other at all
Parameters
p- kernel object
q- suit object

References _PTR(), SalomeApp_DataObject::entry(), and isCorrect().

kerPtr SalomeApp_DataModelSync::nullSrc ( ) const
Returns
null kernel object
suitPtr SalomeApp_DataModelSync::nullTrg ( ) const
Returns
null suit object
suitPtr SalomeApp_DataModelSync::parent ( const suitPtr p) const
Returns
parent of SUIT object
Parameters
p- SUIT object

References SUIT_DataObject::parent().

void SalomeApp_DataModelSync::updateItem ( const kerPtr &  obj,
const suitPtr  
) const

Updates SUIT object

Parameters
p- SUIT object

Member Data Documentation

SUIT_DataObject* SalomeApp_DataModelSync::myRoot
private

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