本文整理汇总了C++中idLexer::SkipUntilString方法的典型用法代码示例。如果您正苦于以下问题:C++ idLexer::SkipUntilString方法的具体用法?C++ idLexer::SkipUntilString怎么用?C++ idLexer::SkipUntilString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idLexer
的用法示例。
在下文中一共展示了idLexer::SkipUntilString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VerifyVariable
/*
================
idTypeInfoTools::VerifyVariable
================
*/
void idTypeInfoTools::VerifyVariable( const char *varName, const char *varType, const char *scope, const char *prefix, const char *postfix, const char *value, const void *varPtr, int varSize ) {
idToken token;
if ( typeError ) {
return;
}
src->SkipUntilString( "=" );
src->ExpectTokenType( TT_STRING, 0, &token );
if ( token.Cmp( value ) != 0 ) {
// NOTE: skip several things
if ( IsRenderHandleVariable( varName, varType, scope, prefix, postfix, value ) ) {
return;
}
if ( IsAllowedToChangedFromSaveGames( varName, varType, scope, prefix, postfix, value ) ) {
return;
}
src->Warning( "state diff for %s%s::%s%s\n%s\n%s", prefix, scope, varName, postfix, token.c_str(), value );
typeError = true;
}
}
示例2: ParseInOutStruct
/*
========================
ParseInOutStruct
========================
*/
void ParseInOutStruct( idLexer & src, int attribType, idList< inOutVariable_t > & inOutVars ) {
src.ExpectTokenString( "{" );
while( !src.CheckTokenString( "}" ) ) {
inOutVariable_t var;
idToken token;
src.ReadToken( &token );
var.type = token;
src.ReadToken( &token );
var.nameCg = token;
if ( !src.CheckTokenString( ":" ) ) {
src.SkipUntilString( ";" );
continue;
}
src.ReadToken( &token );
var.nameGLSL = token;
src.ExpectTokenString( ";" );
// convert the type
for ( int i = 0; typeConversion[i].typeCG != NULL; i++ ) {
if ( var.type.Cmp( typeConversion[i].typeCG ) == 0 ) {
var.type = typeConversion[i].typeGLSL;
break;
}
}
// convert the semantic to a GLSL name
for ( int i = 0; attribsPC[i].semantic != NULL; i++ ) {
if ( ( attribsPC[i].flags & attribType ) != 0 ) {
if ( var.nameGLSL.Cmp( attribsPC[i].semantic ) == 0 ) {
var.nameGLSL = attribsPC[i].glsl;
break;
}
}
}
// check if it was defined previously
var.declareInOut = true;
for ( int i = 0; i < inOutVars.Num(); i++ ) {
if ( var.nameGLSL == inOutVars[i].nameGLSL ) {
var.declareInOut = false;
break;
}
}
inOutVars.Append( var );
}
src.ExpectTokenString( ";" );
}