本文整理汇总了C++中TChar::IsHexDigit方法的典型用法代码示例。如果您正苦于以下问题:C++ TChar::IsHexDigit方法的具体用法?C++ TChar::IsHexDigit怎么用?C++ TChar::IsHexDigit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TChar
的用法示例。
在下文中一共展示了TChar::IsHexDigit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessKeyPressL
void CActiveConsole::ProcessKeyPressL(TChar aChar)
{
if (aChar == EKeyEscape)
{
PRINT(_L("CActiveConsole: ESC key pressed -> stopping active scheduler...\n"));
CActiveScheduler::Stop();
return;
}
aChar.UpperCase();
if (iCmdGetValue != 0 && aChar == '\r')
{
if (iLastChar == 'K')
{
iValue *= iGetHexValue ? 0x400 : 1000;
}
if (iLastChar == 'M')
{
iValue *= iGetHexValue ? 0x10000 : 1000000;
}
PRINT1(_L("CActiveConsole: Value %d\n"),iValue);
ProcessValue();
}
if (iCmdGetValue != 0 )
{
if (iGetHexValue)
{
if (aChar.IsDigit())
{
iValue = iValue * 16 + aChar.GetNumericValue();
}
else
{
if (aChar.IsHexDigit())
{
iValue = iValue * 16 + (TUint)aChar - 'A' + 10;
}
else
{
if (aChar != 'K' && aChar != 'M')
{
PRINT(_L("Illegal hexadecimal character - Enter command\n"));
iCmdGetValue = 0;
}
}
}
}
else
{
if (aChar.IsDigit())
{
iValue = iValue * 10 + aChar.GetNumericValue();
}
else
{
if ((aChar == 'X') && (iLastChar == '0') && (iValue == 0))
iGetHexValue = ETrue;
else
{
if (aChar != 'K' && aChar != 'M')
{
test.Printf(_L("Illegal decimal character - Enter command\n"));
iCmdGetValue = 0;
}
}
}
}
}
else
{
switch (aChar)
{
case 'F' :
TESTNEXT(_L("Flushing Cache"));
test_KErrNone(DPTest::FlushCache());
ShowMemoryUse();
iPrompt = ETrue;
break;
case 'I' :
CacheSize(0,0);
ShowMemoryUse();
iPrompt = ETrue;
break;
case 'Q' :
gQuiet = ETrue;
iPrompt = ETrue;
break;
case 'V' :
gQuiet = EFalse;
iPrompt = ETrue;
break;
case '?' :
ShowHelp();
break;
case '=' :
iCmdGetValue = iLastChar;
//.........这里部分代码省略.........