本文整理汇总了C++中Sequence::addLast方法的典型用法代码示例。如果您正苦于以下问题:C++ Sequence::addLast方法的具体用法?C++ Sequence::addLast怎么用?C++ Sequence::addLast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sequence
的用法示例。
在下文中一共展示了Sequence::addLast方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isMethodCall
static bool isMethodCall( SourceTokenizer& tokenizer )
{
bool ret = false;
Sequence<SourceToken> tokens;
tokens.addLast( tokenizer.nextToken() );
bool loop = true;
while ( loop && tokenizer.hasMoreTokens() )
{
SourceToken* token = tokenizer.nextToken();
const String& value = token->getValue();
SourceToken::TokenType type = token->getTokenType();
switch ( type )
{
case SourceToken::WORD:
case SourceToken::SPACE:
break;
case SourceToken::STARTEXPRESSION:
ret = true;
loop = false;
break;
case SourceToken::INFIXOP:
if ( ! (value.contentEquals( "<" ) || value.contentEquals( ">" )) ) loop = false;
break;
case SourceToken::SYMBOL:
if ( !value.contentEquals( "," ) ) loop = false;
break;
default:
loop = false;
}
tokens.addLast( token );
}
pushbackTokens( tokenizer, tokens );
return ret;
}
示例2: run
static void run( int argc, char** argv )
{
Sequence<Path> paths;
for ( int i=1; i < argc; i++ )
{
paths.addLast( new Path( argv[i] ) );
}
CodeBase* codebase = AstralFactory::createAstralExport( paths, ".java" );
{
Export::toXML( *codebase );
}
delete codebase;
}
示例3: parseArguments
bool parseArguments( int argc, const char** argv, Sequence<String>& fileLocations, MTArguments& arguments )
{
if ( argc <= 1 ) return false;
String* executable = new String( basename( (char*) argv[0] ) );
for ( int i=1; i < argc; i++ )
{
String arg( argv[i] );
if ( arg.equals( "--style" ) )
{
i++;
if ( i < argc )
{
arguments.stylesheet = argv[i];
}
}
else if ( arg.equals( "--format" ) )
{
i++;
if ( i < argc )
{
arguments.format = argv[i];
}
}
else if ( arg.equals( "--out" ) )
{
i++;
if ( i < argc )
{
arguments.outfile = argv[i];
}
}
else if ( arg.equals( "--class" ) )
{
i++;
if ( i < argc )
{
arguments.classType = argv[i];
}
}
else if ( arg.equals( "--parameters" ) )
{
i++;
if ( i < argc )
{
arguments.parameters = argv[i];
}
}
else if ( arg.equals( "--packages" ) )
{
i++;
if ( i < argc )
{
arguments.packages = argv[i];
}
}
else if ( arg.equals( "--content-only" ) )
{
if ( i < argc )
{
arguments.contentOnly = argv[i];
}
}
else
{
fileLocations.addLast( new String( argv[i] ) );
}
}
if ( 0 == CharString_getLength( arguments.format ) )
{
if ( executable->contentEquals( "max2tex" ) )
{
arguments.format = "tex";
}
else
{
arguments.format = "html";
}
}
if ( 0 != CharString_compare( arguments.outfile, "" ) )
{
if ( ! CharString_endsWith( arguments.outfile, arguments.format ) )
{
FormattedString fs( "%s.%s", arguments.outfile, arguments.format );
arguments.outfile = new_CharString( fs.getChars() );
}
}
if ( 0 == CharString_compare( arguments.classType, "" ) )
{
arguments.classType = "article";
}
//.........这里部分代码省略.........
示例4: parseArgumentsX
bool parseArgumentsX( int argc, char** argv, Sequence<String>& fileLocations, String** outfile, String** stylesheet, String** format, String** classType )
{
if ( argc <= 1 ) return false;
String* executable = new String( (const char*) basename( argv[0] ) );
for ( int i=1; i < argc; i++ )
{
String arg( argv[i] );
if ( arg.equals( "--style" ) )
{
i++;
if ( i < argc )
{
delete *stylesheet;
*stylesheet = new String( argv[i] );
}
}
else if ( arg.equals( "--format" ) )
{
i++;
if ( i < argc )
{
delete *format;
*format = new String( argv[i] );
}
}
else if ( arg.equals( "--out" ) )
{
i++;
if ( i < argc )
{
delete *outfile;
*outfile = new String( argv[i] );
}
}
else if ( arg.equals( "--class" ) )
{
i++;
if ( i < argc )
{
delete *classType;
*classType = new String( argv[i] );
}
}
else
{
fileLocations.addLast( new String( argv[i] ) );
}
}
if ( ! *format )
{
if ( executable->contentEquals( "max2tex" ) )
{
*format = new String( "tex" );
}
else
{
*format = new String( "html" );
}
}
if ( *outfile && !(*outfile)->endsWith( **format ) )
{
*outfile = new FormattedString( "%s.%s", (*outfile)->getChars(), (*format)->getChars() );
}
if ( ! *classType )
{
*classType = new String( "article" );
}
delete executable;
return true;
}