Files
mir_server/server/LogicServer/config/TipmsgConfig.h

44 lines
1.1 KiB
C
Raw Permalink Normal View History

2025-01-09 17:45:40 +08:00
#pragma once
#include<map>
//系统提示的ID。书写规则配置文件里增加一条记录必须在这里增加一个ID否则后面将全部乱
//每个系统用一个配置文件
typedef struct tagTipmsgConfig
{
CVector<char *> data;
/*
* Comments: ID获取系统提示的内容
* Param INT_PTR nTipmsgID: ID
* @Return char *:
*/
inline char *GetTipmsg(INT_PTR nTipmsgID)
{
if(nTipmsgID <0 || nTipmsgID >= data.count() )
return NULL;
else return data[nTipmsgID];
}
}TIPMSGCONFIG, *PTIPMSGCONFIG;
typedef struct tagNewTipmsgConfig
{
// CVector<char *> data;
std::map<int, char[1024]> data;
/*
* Comments: ID获取系统提示的内容
* Param INT_PTR nTipmsgID: ID
* @Return char *:
*/
inline char *GetTipmsg(INT_PTR nTipmsgID)
{
// if(nTipmsgID <0 || nTipmsgID >= data.count() )
// return NULL;
// else return data[nTipmsgID];
if(data.find(nTipmsgID) != data.end())
return data[nTipmsgID];
return NULL;
}
}NEWTIPMSGCONFIG, *PNEWTIPMSGCONFIG;