本文整理汇总了C++中Style::AddExtensions方法的典型用法代码示例。如果您正苦于以下问题:C++ Style::AddExtensions方法的具体用法?C++ Style::AddExtensions怎么用?C++ Style::AddExtensions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::AddExtensions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadConfig
void loadConfig(CString& configFile)
{
FILE* f = fopen(configFile, "rt");
if (f)
{
lineno = 0;
while (!feof(f))
{
char* p = getSymbol(f);
if (p)
{
if (strcmpi(p, "Style") == 0)
{
char* styleName = getSymbol(f);
Style* newStyle = 0;
if (strcmpi(styleName, "Default") != 0)
{
SListIterator<Style> styleIterator(styles);
Style* style;
for (style = styleIterator.GoHead(); style; style = styleIterator.GetNext())
{
if (strcmpi(style->iStyleName, styleName) == 0)
{
newStyle = style;
break;
}
}
if (!newStyle)
{
newStyle = new Style(styleName);
styles.Add(newStyle);
}
}
else
{
newStyle = gDefaultStyle;
}
styleSec = SS_UNKNOWN;
if (strcmp(getSymbol(f), "(") != 0)
{
cprintf("%s(%i): '(' expected\n", (const char*)configFile, lineno);
exit(3);
}
char* ext;
do
{
ext = getSymbol(f);
if (*ext != '.' && *ext != ')' && *ext != '*')
{
cprintf("%s(%i): file extension expected\n", (const char*)configFile, lineno);
exit(3);
}
if (*ext == '.' || *ext == '*')
{
newStyle->AddExtensions(CString(ext));
}
}
while (*ext != ')');
char* baseStyles = getSymbol(f);
if (strcmp(baseStyles, "{") != 0)
{
// we have base styles
while (strcmp(baseStyles, "{") != 0)
{
Style* sty;
SListIterator<Style> styleIterator(styles);
for (sty = styleIterator.GoHead();
sty;
sty = styleIterator.GetNext())
{
if (strcmpi(sty->iStyleName, baseStyles) == 0)
newStyle->AddBaseStyle(sty);
}
baseStyles = getSymbol(f);
}
}
char* sym = 0;
do
{
sym = getSymbol(f);
//.........这里部分代码省略.........