本文整理汇总了C++中CTokenizer::SetReturnNegativeSeperatelyFromNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ CTokenizer::SetReturnNegativeSeperatelyFromNumber方法的具体用法?C++ CTokenizer::SetReturnNegativeSeperatelyFromNumber怎么用?C++ CTokenizer::SetReturnNegativeSeperatelyFromNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTokenizer
的用法示例。
在下文中一共展示了CTokenizer::SetReturnNegativeSeperatelyFromNumber方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseTrigger
void CStateParser::ParseTrigger(CTokenizer &tok,CStateManager &StateManager)
{
tok.SetReturnNegativeSeperatelyFromNumber(true);
EvaluateExpression(tok,StateManager);
tok.SetReturnNegativeSeperatelyFromNumber(false);
}
示例2: ParseStateFile
void CStateParser::ParseStateFile(const char* strFileName,CStateManager &StateManager,CAllocater *a)
{
//Set pointer to allocater
m_pAlloc=a;
CTokenizer tok;
bool foundState=false;
if( !tok.OpenFile(strFileName) )
throw(CError("CStateParser::ParseState: File %s not found",strFileName));
tok.SetIsCaseSensitive(false);
tok.SetReturnNegativeSeperatelyFromNumber(false);
while( !tok.AtEndOfFile() )
{
foundState=false;
if( tok.CheckToken("[") )
{
if( tok.CheckToken("statedef") )
{
foundState=true;
if(!tok.CheckTokenIsNumber())
Error("Expected a number in statedef block",tok);
StateManager.AddStateDef(tok.GetInt());
//Skip useless stuff
while( !tok.AtEndOfLine() )
tok.GetToken();
//parse the state def
ParseStateDef(tok,StateManager);
}
if( tok.CheckToken("state") )
{
foundState=true;
if(!tok.CheckTokenIsNumber())
Error("Expected a number in state block",tok);
int stateno = tok.GetInt();
tok.CheckToken(",");
// if(!tok.CheckTokenIsQuotedString()
// && !tok.CheckTokenIsNumber())
// Error("Expected a number in state block",tok);
std::string str = tok.GetToken();
StateManager.AddState(stateno, str.c_str());
while(!tok.AtEndOfLine())
tok.GetToken();
PareseState(tok,StateManager);
}
}
//skip useless stuff
if(!foundState)
tok.GetToken();
}
tok.CloseFile();
}