You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
861 B
C++
45 lines
861 B
C++
#pragma once
|
|
|
|
#include "Defines.h"
|
|
|
|
#include "mProjectManager_global.h"
|
|
|
|
class ZxDataObject;
|
|
|
|
// 本类的目的通过单例实现对管理表名称映射
|
|
class M_PROJECTMANAGER_EXPORT iTableNameHelper
|
|
{
|
|
public:
|
|
|
|
// 获取对象,单例模式
|
|
static iTableNameHelper* getInstance();
|
|
|
|
// 关闭消耗
|
|
static void release();
|
|
|
|
// 根据类型获取表名
|
|
QString getTableNameBy(QString sObjType);
|
|
|
|
// 根据表名获取类型
|
|
QString getObjTypeBy(QString sTableName);
|
|
|
|
// 根据表名创建数据对象
|
|
ZxDataObject* createObjByTableName(QString sTableName);
|
|
|
|
// 根据类型创建数据对象
|
|
ZxDataObject* createObjByObjType(QString sObjType);
|
|
|
|
private:
|
|
|
|
iTableNameHelper();
|
|
~iTableNameHelper();
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
static iTableNameHelper* _helper;
|
|
|
|
QMap<QString, QString> m_mapNameTypes;
|
|
};
|