本文整理汇总了C++中CBlock::Free方法的典型用法代码示例。如果您正苦于以下问题:C++ CBlock::Free方法的具体用法?C++ CBlock::Free怎么用?C++ CBlock::Free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlock
的用法示例。
在下文中一共展示了CBlock::Free方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//.........这里部分代码省略.........
case TK_FLOAT:
token->Delete();
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("syntax error : unexpected float");
return m_iBadCBlockNumber;
break;
case TK_IDENTIFIER:
m_iBadCBlockNumber++;
if (!GetID( (char *) token->GetStringValue() ))
{
token->Delete();
return m_iBadCBlockNumber;
}
token->Delete();
break;
case TK_BLOCK_START:
token->Delete();
if (parenthesisLevel)
{
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("syntax error : brace inside parenthesis");
return m_iBadCBlockNumber;
}
blockLevel++;
break;
case TK_BLOCK_END:
token->Delete();
if (parenthesisLevel)
{
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("syntax error : brace inside parenthesis");
return m_iBadCBlockNumber;
}
block.Create( ID_BLOCK_END );
m_blockStream->WriteBlock( &block );
block.Free();
blockLevel--;
break;
case TK_OPEN_PARENTHESIS:
token->Delete();
blockLevel++;
parenthesisLevel++;
break;
case TK_CLOSED_PARENTHESIS:
token->Delete();
blockLevel--;
parenthesisLevel--;
if (parenthesisLevel<0)
{
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("syntax error : closed parenthesis with no opening match");
return m_iBadCBlockNumber;
}
break;
case TK_VECTOR_START:
token->Delete();
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("syntax error : unexpected vector");
return m_iBadCBlockNumber;
break;
case TK_VECTOR_END:
token->Delete();
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("syntax error : unexpected vector");
return m_iBadCBlockNumber;
break;
}
}
if ( blockLevel )
{
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("error : open brace was not closed");
return m_iBadCBlockNumber;
}
if ( parenthesisLevel )
{
m_iBadCBlockNumber = -m_iBadCBlockNumber;
Error("error: open parenthesis");
return m_iBadCBlockNumber;
}
//Release all the variable information, because it's already been written out
FreeVars();
m_iBadCBlockNumber = 0;
return m_iBadCBlockNumber; //true;
}