| 9325 | |
| 9326 | auto name() const -> std::string { return *m_name; } |
| 9327 | auto set( std::string const& newName ) -> ParserResult { |
| 9328 | |
| 9329 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 9330 | auto filename = ( lastSlash == std::string::npos ) |
| 9331 | ? newName |
| 9332 | : newName.substr( lastSlash+1 ); |
| 9333 | |
| 9334 | *m_name = filename; |
| 9335 | if( m_ref ) |
| 9336 | return m_ref->setValue( filename ); |
| 9337 | else |
| 9338 | return ParserResult::ok( ParseResultType::Matched ); |
| 9339 | } |
| 9340 | }; |
| 9341 | |
| 9342 | class Arg : public ParserRefImpl<Arg> { |