本文整理汇总了C++中Filename::ClearSuffix方法的典型用法代码示例。如果您正苦于以下问题:C++ Filename::ClearSuffix方法的具体用法?C++ Filename::ClearSuffix怎么用?C++ Filename::ClearSuffix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filename
的用法示例。
在下文中一共展示了Filename::ClearSuffix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadPreset
Bool ReadPreset(const Filename& fnPreset)
{
AutoAlloc <BaseFile> pFile;
if (!pFile)
return false;
Filename fnTemp;
PresetElement* pPreset;
String strName;
Int32 n;
CDynamicArray <char> arLine;
char* pszLine;
Bool bHeaderRead = false;
String str;
fnTemp = fnPreset.GetFile();
fnTemp.ClearSuffix();
strName = fnTemp.GetString();
bHeaderRead = false;
for (n = 0; n < g_Presets.GetElementCount(); n++)
{
if (g_Presets[n]->strName == strName)
break;
}
if (n != g_Presets.GetElementCount())
return false;
pPreset = g_Presets.GetNextObject();
if (!pPreset)
return false;
pPreset->strName = strName;
if (!pFile->Open(fnPreset))
return false;
while (ReadLine(pFile, arLine))
{
pszLine = arLine.GetArray();
if (!bHeaderRead)
{
if (strstr(pszLine, FILE_HEADER) == pszLine)
{
bHeaderRead = true;
continue;
}
}
if (!bHeaderRead)
break;
while (*pszLine != '\0')
{
if (strstr(pszLine, ORIG_PATH) == pszLine)
{
pszLine += strlen(ORIG_PATH);
ReadString(pszLine, pPreset->strOrigin);
}
if (strstr(pszLine, DEST_PATH) == pszLine)
{
pszLine += strlen(DEST_PATH);
ReadString(pszLine, pPreset->strDestination);
}
if (strstr(pszLine, CREATE_ZIP) == pszLine)
{
pszLine += strlen(CREATE_ZIP);
ReadBool(pszLine, pPreset->bCreateZipFile);
}
if (strstr(pszLine, CREATE_ZIP_COMPRESSION) == pszLine)
{
pszLine += strlen(CREATE_ZIP_COMPRESSION);
ReadInt32(pszLine, pPreset->lCreateZipCompressionLevel);
}
if (strstr(pszLine, CHECK_VERSION) == pszLine)
{
pszLine += strlen(CHECK_VERSION);
ReadBool(pszLine, pPreset->bCheckVersion);
}
if (strstr(pszLine, PARSE_SYMBOLS) == pszLine)
{
pszLine += strlen(PARSE_SYMBOLS);
ReadBool(pszLine, pPreset->bParseSymbols);
}
if (strstr(pszLine, WRITE_BUILD) == pszLine)
{
pszLine += strlen(WRITE_BUILD);
ReadBool(pszLine, pPreset->bWriteBuildInfo);
}
if (strstr(pszLine, REMOVE_SCC) == pszLine)
{
pszLine += strlen(REMOVE_SCC);
ReadBool(pszLine, pPreset->bRemoveSCC);
}
if (strstr(pszLine, BATCH) == pszLine)
{
pszLine += strlen(BATCH);
ReadBool(pszLine, pPreset->bBatch);
}
if (strstr(pszLine, PASSWORD) == pszLine)
{
//.........这里部分代码省略.........