Exemple #1
0
/**
 * @brief extract the padding from a vector of frame numbers
 * @param[in] timesStr vector of frame numbers in string format
 */
std::size_t extractPadding( const std::vector<std::string>& timesStr )
{
	BOOST_ASSERT( timesStr.size() > 0 );
	const std::size_t padding = getPaddingFromStringNumber( timesStr.front() );

	BOOST_FOREACH( const std::string& s, timesStr )
	{
		if( padding != getPaddingFromStringNumber( s ) )
		{
			return 0;
		}
	}
	return padding;
}
/**
 * @brief extract the padding from a vector of frame numbers
 * @param[in] timesStr vector of frame numbers in string format
 */
void Sequence::extractPadding( const std::vector<std::string>& timesStr )
{
	BOOST_ASSERT( timesStr.size() > 0 );
	const std::size_t padding = getPaddingFromStringNumber( timesStr.front() );

	BOOST_FOREACH( const std::string& s, timesStr )
	{
		if( padding != getPaddingFromStringNumber( s ) )
		{
			_padding = 0;
			return;
		}
	}
	_padding = padding;
}