本文整理汇总了C++中StatusMessage::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ StatusMessage::Clear方法的具体用法?C++ StatusMessage::Clear怎么用?C++ StatusMessage::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatusMessage
的用法示例。
在下文中一共展示了StatusMessage::Clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
void
StatusMessageList::LoadFile(TLineReader &reader)
{
// Init first entry
StatusMessage current;
current.Clear();
/* Read from the file */
TCHAR *buffer;
const TCHAR *key, *value;
while ((buffer = reader.ReadLine()) != NULL) {
// Check valid line? If not valid, assume next record (primative, but works ok!)
if (*buffer == _T('#') || !parse_assignment(buffer, key, value)) {
// Global counter (only if the last entry had some data)
if (!current.IsEmpty()) {
list.append(current);
current.Clear();
if (list.full())
break;
}
} else {
if (_tcscmp(key, _T("key")) == 0) {
if (current.key == NULL)
current.key = UnescapeBackslash(value);
} else if (_tcscmp(key, _T("sound")) == 0) {
if (current.sound == NULL)
current.sound = UnescapeBackslash(value);
} else if (_tcscmp(key, _T("delay")) == 0) {
TCHAR *endptr;
unsigned ms = ParseUnsigned(value, &endptr);
if (endptr > value)
current.delay_ms = ms;
} else if (_tcscmp(key, _T("hide")) == 0) {
if (_tcscmp(value, _T("yes")) == 0)
current.visible = false;
}
}
}
if (!current.IsEmpty())
list.append(current);
}