本文整理汇总了C++中FlarmId::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ FlarmId::GetId方法的具体用法?C++ FlarmId::GetId怎么用?C++ FlarmId::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlarmId
的用法示例。
在下文中一共展示了FlarmId::GetId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LookupFLARMDetails
// Used by TeamCode, to select a CN and get back the Id
int LookupFLARMDetails(TCHAR *cn)
{
// try to find flarm from userFile
int index = LookupSecondaryFLARMId(cn);
if (index != -1)
{
return FLARM_Names[index].ID;
}
// try to find flarm from FLARMNet.org File
FlarmId* flarmId = file.GetFlarmIdItem(cn);
if (flarmId != NULL)
{
return flarmId->GetId();
}
return 0;
}
示例2: LKSound
FlarmIdFile::FlarmIdFile(void)
{
TCHAR path[MAX_PATH];
LKSound(_T("LK_CONNECT.WAV"));
TCHAR flarmIdFileName[MAX_PATH] = TEXT("\0");
#if NOSIM
if (SIMMODE) return;
#else
#ifdef _SIM_
return;
#endif
#endif
LocalPath(path);
wsprintf(flarmIdFileName, TEXT("%s\\%s\\%s"), path, TEXT(LKD_CONF), TEXT(LKF_FLARMNET));
FILE* hFile = _wfopen(flarmIdFileName, TEXT("rt"));
if (hFile == NULL) {
wsprintf(flarmIdFileName, TEXT("%s\\%s\\data.fln"), path, TEXT(LKD_CONF));
hFile = _wfopen(flarmIdFileName, TEXT("rt"));
if (hFile == NULL) return;
}
DWORD fileLength;
fseek (hFile , 0 , SEEK_END);
fileLength = ftell (hFile);
fseek (hFile , 7 , SEEK_SET);
int itemCount = 0;
while( ( (signed)fileLength - ftell(hFile)) > 87) {
FlarmId *flarmId = new FlarmId;
GetItem(hFile, flarmId);
flarmIds[flarmId->GetId()] = flarmId;
itemCount++;
}
FlarmNetCount=itemCount;
fclose(hFile);
}
示例3: TEXT
FlarmIdFile::FlarmIdFile(void)
{
TCHAR path[MAX_PATH];
TCHAR flarmIdFileName[MAX_PATH] = TEXT("\0");
LocalPath(path);
_stprintf(flarmIdFileName, TEXT("%s%s%s%s%s"), path, _T(DIRSEP), TEXT(LKD_CONF), _T(DIRSEP), TEXT(LKF_FLARMNET));
FILE* hFile = _tfopen(flarmIdFileName, TEXT("rt"));
if (hFile == NULL) {
_stprintf(flarmIdFileName, TEXT("%s%s%s%sdata.fln"), path, _T(DIRSEP), TEXT(LKD_CONF), _T(DIRSEP));
hFile = _tfopen(flarmIdFileName, TEXT("rt"));
if (hFile == NULL) return;
}
fseek (hFile , 0 , SEEK_END);
long int fileLength = ftell (hFile);
fseek (hFile , 7 , SEEK_SET);
int itemCount = 0;
while( ( fileLength - ftell(hFile)) > 87) {
FlarmId *flarmId = new FlarmId;
_tcscpy(flarmId->id,_T(""));
_tcscpy(flarmId->name,_T(""));
_tcscpy(flarmId->airfield,_T(""));
_tcscpy(flarmId->type,_T(""));
_tcscpy(flarmId->reg,_T(""));
_tcscpy(flarmId->cn,_T(""));
_tcscpy(flarmId->freq,_T(""));
GetItem(hFile, flarmId);
flarmIds[flarmId->GetId()] = flarmId;
itemCount++;
}
FlarmNetCount=itemCount;
fclose(hFile);
}