Skip to content

Light "EMF Framework like" that convert an Ecore DataModel in C++11/QT. Easy to load/write an XMI or to create a model from scratch. A script can be used to generate the C++ classes corresponding to any Ecore. Easy to integrate in with an UndoStack. Can be used to manage any type of Data that follows an Ecore diagram. (e-opposite are updated aut…

mbruel/miniEMF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniEMF

The mini EMF framework is a C++11/QT transposition of an Ecore Model.
Instead of using the standard Class attributes we’re using a Property management system.
The idea doing this is to automatically update the e-opposites.
It's kind of replacing the observer pattern.

Here are the main advantages of using this framework:

  • Updating a link property of an MObject (ModelObject) automatically updates the opposite MObjects (if the property has a reverse property (e-opposite)).
  • Removing an MObject from the Model will automatically remove it from all the other MObjects that use it
  • Every property is updated using one single method (MObject::updateValue) which makes it pretty easy to integrate a Model within an Undo Framework
  • Loading and Dumping a model in XML is easy (xmi format)
  • Possibility to do shallow copy or deep copy of a subset of the Model

How to use it

  • Create all your business Objects (ex: Person, Meeting...) that derives from MObject
  • Declare all their Properties that derives from Property (DoubleProperty, Link11Property, MapLinkProperty...)
  • in a TypeFactory deriving from MObjectTypeFactory, istanciate an MObjectType for each of your business Objects and define their Ecore inheritance.
  • in a PropertyFactory deriving from PropertyFactory, instanciate all the Properties of your objects, linking them with their e-opposites

To be continued...
In the meantime you can check the SimpleExample

About

Light "EMF Framework like" that convert an Ecore DataModel in C++11/QT. Easy to load/write an XMI or to create a model from scratch. A script can be used to generate the C++ classes corresponding to any Ecore. Easy to integrate in with an UndoStack. Can be used to manage any type of Data that follows an Ecore diagram. (e-opposite are updated aut…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published