void CommandLineParser::Process
	( 
		const StringStore& commandArgs 
	)
	{
		if ( commandArgs.empty() )
		{
			return;
		}

		commandLine_ = commandArgs[0];

		if ( commandArgs.size() > 1 )
		{
			StringStore::const_iterator current = commandArgs.begin();
			StringStore::const_iterator end		= commandArgs.end();
			while( current != end )
			{
				std::string param( *current );

				if ( helpSwitch == param || helpSwitchLong == param )
				{
					showHelp_ = true;
				}
				else if ( noHeaderSwitch == param || noHeaderSwitchLong == param )
				{
					showHeader_ = false;
				}
				else if ( listTestsSwitch == param || listTestsSwitchLong == param )
				{
					listTests_ = true;
				}
				else if ( listTestSetsSwitch == param || listTestSetsSwitchLong == param )
				{
					listTestSets_ = true;
				}
				else if ( ( testSwitch == param || testSwitchLong == param ) && GetNextParam( current, end, param ) )
				{
					tests_.push_back( param );
				}
				else if ( ( testSetSwitch == param || testSetSwitchLong == param ) && GetNextParam( current, end, param ) )
				{
					testSets_.push_back( param );
				}
				else if ( ( reportSwitch == param || reportSwitchLong == param ) && GetNextParam( current, end, param ) )
				{
					report_ = param;				
				}
				
				if ( current != end )
				{
					++current;
				}
			}
		}
	}
Beispiel #2
0
 StringStore::const_iterator end() const {
     return m_strings.end();
 }