QxOrm(引擎)+ QxEntityEditor(图形编辑器)= 用C++/Qt管理持久数据层的最佳解决方案

QxOrm (the engine) + QxEntityEditor (the graphic editor) = the best solution to manage your persistent data layer in C++/Qt !

QxOrm(引擎)+QxEntityEditor(图形编辑器)=用C++/Qt管理持久数据层的最佳解决方案!

QxOrm library is an Object Relational Mapping (ORM) database library for C++/Qt developers. With a simple C++ setting function per class (like Hibernate XML mapping file in Java), you have access to the following features :

​QxOrm库是面向C++/Qt开发人员的数据库对象关系映射(ORM)库。具有类每一个简单的C++ C++设置函数(如java中的Hibernate XML映射文件),您可以访问以下特性:

  • Persistence : support most common databases like SQLite, MySQL, PostgreSQL, Oracle, MS SQL Server, MongoDB (with 1-11-nn-1 and n-n relationships) ;
  • 持久性:支持最常见的数据库,如SQLite、MySQL、PostgreSQL、Oracle、MS SQL Server、MongoDB(具有1-1、1-n、n-1和n-n关系);
  • Serialization : JSON, binary and XML format ;
  • 序列化:JSON、二进制和XML格式;
  • Reflection (or introspection) : access dynamically to classes definitions, retrieve properties and call classes methods ;
  • 反射(或内省):动态访问类定义、检索属性和调用类方法;
  • HTTP web server : standalone multi-threaded HTTP 1.1 web server (support SSL/TLS, persistent connections, cookies, sessions, chunked responses, URL dispatcher/routing) ;
  • HTTP web服务器:独立的多线程HTTP 1.1 web服务器(支持SSL/TLS、持久连接、cookie、会话、分块响应、URL调度程序/路由);
  • JSON API : interoperability with other technology than C++/Qt (REST web services, QML applications, scripting language).
  • JSON API:与C++/Qt(REST web服务、QML应用程序、脚本语言)以外的其他技术的互操作性。

QxEntityEditor is a graphic editor for QxOrm library : QxEntityEditor provides a graphic way to manage the data model.

QxEntityEditor是QxOrm库的图形编辑器:QxEntityEditor提供了一种管理数据模型的图形方式。
QxEntityEditor is multi-platform (available for Windows, Linux and Mac OS X) and generates native code for all environments : desktop (Windows, Linux, Mac OS X), embedded and mobile (Android, iOS, Windows Phone, Raspberry Pi, etc.).

QxEntityEditor是多平台的(适用于Windows、Linux和Mac OS X),为所有环境生成本机代码:桌面(Windows、Linux、Mac OS X)、嵌入式和移动(Android、iOS、Windows Phone、Raspberry Pi等)。
A user manual (documentation) for QxEntityEditor application is available.

QxEntityEditor应用程序的用户手册(文档)可用。

QxEntityEditor is based on plugins and provides many ways to import/export your data model :

QxEntityEditor基于插件,提供多种导入/导出数据模型的方法:

  • generate C++ persistent classes automatically (registered in QxOrm context) ;
  • 自动生成C++持久类(QxOrm上下文注册);
  • generate DDL SQL script automatically (database schema) for SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server ;
  • 为SQLite、MySQL、PostgreSQL、Oracle和MS SQL Server自动生成DDL SQL脚本(数据库模式);
  • manage schema evolution for each project version (ALTER TABLEADD COLUMNDROP INDEX, etc.) ;
  • 管理每个项目版本演变(更改表、添加列、删除索引等);
  • transfer your data model over network and create quickly client/server applications, using QxService module ;
  • 通过网络传输数据模型,使用QxService模块快速创建客户机/服务器应用程序;
  • import existing database structure (using ODBC connection or native drivers) for SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server databases ;
  • 导入SQLite、MySQL、PostgreSQL、Oracle和MS SQL Server数据库的现有数据库结构(使用ODBC连接或本机驱动程序);
  • because each project is different, QxEntityEditor provides several ways to customize generated files (especially a javascript engine and an integrated debugger).
  • 由于每个项目都不同,QxEntityEditor提供了几种定制生成文件的方法(尤其是javascript引擎和集成调试器)。

 QxOrm library is designed to make easier C++ development and provides many functionalities.
Here is a list of advantages of QxOrm library :

QxOrm库是为了简化C++开发而设计的,提供了许多功能。
以下是QxOrm库的优点列表:

  • non intrusive : the C++ setting function per class doesn't modify class definition, QxOrm can be used in existing projects ;
  • 非侵入性:每类席的C++设置函数不修改类定义,QxOrm可用于现有项目;
  • no XML mapping file ;
  • 没有XML映射文件;
  • classes doesn't need to inherit from a 'super object' ;
  • 类不需要从“超级对象”继承;
  • template meta-programming : no macro hack ;
  • 模板元编程:没有宏攻击;
  • works with Visual C++ on Windows, GCC on Linux, Clang on Mac OS X, and MinGW on Windows (other platforms will be tested soon : smartphones, etc...) ;
  • 与Windows上的Visual C++、Linux上的GCC、在Mac OS X上的Clang以及Windows上的MinGW(其他平台将很快损坏:智能手机等)一起工作;
  • only one file <QxOrm.h> to include in precompiled-header (precompiled-header file is recommended to reduce compilation times).
  • 只有一个文件<QxOrm.h> 包含在预编译头文件中(建议使用预编译头文件以减少编译时间)。

QxOrm is based on Qt framework (from version 4.5.0) :

​QxOrm基于Qt框架(从4.5.0版开始):

Qt : cross-platform application development framework : GUI (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 many 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 : Qt | Cross-platform software development for embedded & desktop

Qt:跨平台应用程序开发框架:GUI(QtGui)、网络(QtNetwork)、XML(QtXml)、数据库(QtSql)。。。
Qt提供了出色的支持和文档。使用Qt,可以编写简单而强大的C++代码。
Qt由Digia的Qt开发框架部门生产,并获得LGPL许可。
QxOrm与许多Qt对象兼容:QObject、QString、QDate、QTime、QDateTime、QList、QHash、QSharedPointer、QScopedPointer...
建议在以下地址安装最新版本的Qt:http://www.qt.io/

QxOrm provides the following modules :

QxOrm提供以下模块:

  • QxDao : based on Qt QtSql engine, this module provides communication with databases (select, update, delete, transaction...) by mapping database table columns with C++ class properties. The relationships 1-11-nn-1 and n-n are easy to setup in C++ code. This module supports object-oriented programming : inheritance, polymorphism, modularity. It supports also many containers (stlboost and Qt : std::vector, std::list, std::unordered_map, QList, QHash...).

  • QxDao:基于Qt-QtSql引擎,该模块提供与数据库的通信(选择、更新、删除、事务…)通过用C++类属性映射数据库表列。在C++代码中,易于建立关系1-1、1-n、n-1和n-n。该模块支持面向对象编程:继承、多态、模块化。它还支持许多容器(std::vector, std::list, std::unordered_map, QList, QHash...)。

  • QxRegisterQxDataMemberQxFactory and QxFunction : QxOrm emulates reflection (or introspection) mechanism (like other languages : Java, C#...).

  • QxRegister、QxDataMember、QxFactory和QxFunction:QxOrm模拟反射(或内省)机制(与其他语言一样:Java、C#……)。

  • QxModelView : each class registered in 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 in QxOrm context. This module makes easier interaction between QML and databases.

  • QxModelView:QxOrm上下文中注册的每个类都可以被Qt模型/视图引擎(Qt widgets或QML视图)使用。qx::IxModel接口自动向QML引擎公开QxOrm上下文中定义的所有属性。该模块使QML和数据库之间的交互更加容易。

  • 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 about QxService module, a tutorial is available here.

  • QXService:基于Qt库的QT网络引擎,该模块提供了一个简单、强大的创建C++应用服务器的方法(服务请求从客户端请求和服务器回复)。QxService使用QxOrm库中的序列化和内省,通过网络传输任何类或结构。有关QxService模块的更多详细信息,请参阅此处的教程。

  • QxCollection<Key, Value> : this thread-safe container has advantages of std::vector<T> (insertion order + quick access by index) and std::unordered_map<Key, Value> or QHash<Key, Value> (quick access by a key : hash-map). QxCollection<Key, Value> is adapted to contain the items resulting from a database.

  • QxCollection<Key,Value>:这个线程安全的容器具有std::vector<T>(插入顺序+通过索引快速访问)和std::unordered_map<Key,Value>或QHash<Key,Value>(通过键快速访问:hash-map)的优点。QxCollection<Key,Value>适用于包含数据库生成的项。

  • QxSerialize : this module is based on Qt QDataStream class. Any class defined by QxOrm can be serialized to binary, XML and JSON 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.

  • QxSerialize:该模块基于Qt QDataStream类。QxOrm定义的任何类都可以序列化为二进制、XML和JSON格式。该模块还允许克隆对象的所有实例。大多数Qt对象(QObject、QString、QDate、QTime、QDateTime、QList、QHash…)与QxSerialize模块兼容。

  • QxTraits : C++ standard library provides several generic traits. QxOrm uses them but needs new functionalities that are not present in std standard library.

  • QxTraits:C++标准库提供了几个通用特性。QxOrm使用它们,但需要std标准库中没有的新功能。

  • QxCache : QxOrm's cache can contain all types of objects. It's possible for example to store data resulting from a database to avoid too frequent requests. This cache is generic and can be used in other contexts than QxOrm.

  • QxCache:QxOrm的缓存可以包含所有类型的对象。例如,可以存储数据库产生的数据,以避免过于频繁的请求。该缓存是通用的,可以在QxOrm之外的其他上下文中使用。

  • QxValidator : this module provides a validation engine for classes registered in 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 information about QxValidator module, read the manual here.

  • QxValidator:该模块为在QxOrm上下文中注册的类提供验证引擎。要使用这个验证引擎,必须将约束定义到每个类的映射函数中:void qx::register_class。如果对于类的实例,检测到至少一个约束冲突,则该实例无效:无法将对象保存到数据库中(插入或更新)。有关QxValidator模块的更多信息,请阅读此处的手册。

  • QxMemLeak : fast detection of memory leaks in Debug mode (with indication of file and line => MFC style 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 enabled. By default, QxMemLeak module is disabled.

  • QxMemLeak:在调试模式下快速检测内存泄漏(显示文件和行=>微软的MFC风格)。本模块由吴永伟开发。如果项目中已经使用了其他工具(例如Valgrind),则不应启用此功能。默认情况下,QxMemLeak模块被禁用。

You can download the current version of QxOrm library and QxEntityEditor application here.

​您可以在此处下载当前版本的QxOrm库和QxEntityEditor应用程序。
A manual (user guide) to learn how to work with QxOrm library is available here.

​这里提供了学习如何使用QxOrm库的手册(用户指南)。
A quick sample showing basic functionalities of QxOrm is available here.

​这里有一个显示QxOrm基本功能的快速示例。
If you have any questions about QxOrm library or QxEntityEditor application, a forum is available here.

​如果您对QxOrm库或QxEntityEditor应用程序有任何疑问,可以在这里找到一个论坛。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值