QxEntityEditor is a graphic editor for QxOrm library : QxEntityEditor provides a graphic way to manage the data model.
|QxOrm (the engine) + QxEntityEditor (the graphic editor) = the best solution to manage your data in C++/Qt !
QxOrm library is an Object Relational Mapping (ORM) library for C++/Qt developers.
With a simple C++ setting function by class (like Hibernate XML mapping file), you will have access to the following features :
- persistence : communication with a lot of databases (with 1-1, 1-n, n-1 and n-n relationships) ;
- serialization : binary and XML format ;
- reflection (or introspection) : access to classes definitions, retrieve properties and call classes methods.
QxOrm library has been accepted into the Qt Ambassador Program
QxEntityEditor is multi-platform (available for Windows, Linux and Mac OS X) and generate native code for all environments : desktop (Windows, Linux, Mac OS X), embedded and mobile (Android, iOS, Raspberry Pi, etc.).
A video presentation of QxEntityEditor application is available.
QxEntityEditor is based on plugins and provides many ways to import/export your data model :
- generate C++ persistent classes automatically (registered into QxOrm context) ;
- generate DDL SQL script automatically (database schema) for SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server ;
- manage schema evolution for each project version (ALTER TABLE, ADD COLUMN, DROP INDEX, etc.) ;
- transfer your data model over network and create quickly client/server applications, using QxService module ;
- import existing database structure (using ODBC connection) for SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server databases.
QxOrm library aims to simplify C++ development and provides a lot of functionalities.
Here is a list of advantages of QxOrm :
Before you install and compile QxOrm, you need the following libraries : boost (from version 1.38) and Qt (from version 4.5.0) :
- non intrusive : the C++ setting function doesn't modified class definition, QxOrm can be used in existing projects ;
- no XML mapping file ;
- classes doesn't need to inherit from a 'super object' ;
- template meta-programming : no macro hack ;
- works with Visual C++ 2008, 2010 and 2012 on Windows, GCC 4.4.1 on Linux, Clang on Mac OS X, and MinGW on Windows (other platforms will be tested soon : smartphones, etc...) ;
- only one file <QxOrm.h> to include in precompiled-header (need precompiled-header file to reduce compilation times).
||boost : many of boost's founders are on the C++ standard committee and several boost libraries have been accepted for incorporation into C++1x (new standard for the C++ programming language).
The boost's libraries are aimed at a wide range of C++ users and application domains.
QxOrm uses the following features of boost : smart_pointer, serialization, type_traits, multi_index_container, unordered_container, any, tuple, foreach, function.
It is recommended to install the latest version of boost available at the following address : http://www.boost.org/
||Qt : cross-platform application development framework : ihm (QtGui), network (QtNetwork), XML (QtXml), database (QtSql)...
Qt provides excellent support and documentation. Using Qt, you can write simple and powerful C++ code.
Qt is produced by Digia's Qt Development Frameworks division and is available under LGPL license.
QxOrm is compatible with a lot of Qt's objects : QObject, QString, QDate, QTime, QDateTime, QList, QHash, QSharedPointer, QScopedPointer...
It is recommended to install the latest version of Qt available at the following address : http://qt.digia.com/
QxOrm contains the following modules :
QxDao : based on QtSql engine of Qt, this module allows to communicate (select, update, delete, transaction...) with many databases by mapping each field of a table with properties of a C++ class. The relationships 1-1, 1-n, n-1 and n-n are very easy to setup in C++ code. This module supports object-oriented programming : inheritance, polymorphism, modularity. It supports also a lot of containers (stl, boost and Qt : std::vector, std::list, boost::unordered_map, QList, QHash...).
QxRegister, QxDataMember, QxFactory and QxFunction : QxOrm emulates reflection (or introspection) mechanism (like other languages : Java, C#...).
QxModelView : each class registered into QxOrm context can be used by the Qt model/view engine (Qt widgets and/or QML views). qx::IxModel interface exposes automatically to QML engine all properties defined into QxOrm context. This module makes easier interaction between QML and databases.
QxService : based on QtNetwork engine of Qt library, this module provides an easy and powerful way to create C++ application server (services concept with request from client and reply from server). QxService uses serialization and introspection from QxOrm library to transfer over network any class or structure. For more details on QxService module, a tutorial is available here.
QxCollection<Key, Value> : based on boost::multi_index_container, this collection has advantages of std::vector<T> (insertion order + quick access by index) and boost::unordered_map<Key, Value> or QHash<Key, Value> (quick access by a key : hash-map). QxCollection<Key, Value> is adapted to contain the elements resulting from a database.
QxSerialize : this module is based on the excellent library boost::serialization. Any class defined by QxOrm can be serialize into binary and XML format. This module also allows to clone all instances of objects. Most of Qt objects (QObject, QString, QDate, QTime, QDateTime, QList, QHash...) are compatible with QxSerialize module.
QxTraits : boost library provides a lot of generic traits. QxOrm uses them but needs new functionalities that are not present in boost.
QxCache : QxOrm's cache can contain all types of objects. It can make it possible for example to memorize data resulting from a database to avoid too frequent requests. This cache is generic and can be used in other contexts than QxOrm.
QxValidator : this module provides a validation engine for classes registered into QxOrm context. To use this validation engine, you have to define your constraints into the mapping function per class : void qx::register_class. If for an instance of class, at least one constraint violation is detected, then the instance is invalid : the object cannot be saved into database (INSERT or UPDATE). For more informations about QxValidator module, goto the FAQ of QxOrm library.
QxMemLeak : fast detection of memory leaks in Debug mode (with indication of the file and the line => style MFC from Microsoft). This module is developed by Wu Yongwei. If another tool is already used in your projects (Valgrind for example), this functionality should not be activated. By default, QxMemLeak module is disabled.
You can download the last version of QxOrm and QxEntityEditor here.
A quick sample showing the basic functionalities of QxOrm is available here.
A forum is available here.