| 7431 | |
| 7432 | auto name() const -> std::string { return *m_name; } |
| 7433 | auto set( std::string const& newName ) -> ParserResult { |
| 7434 | |
| 7435 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 7436 | auto filename = ( lastSlash == std::string::npos ) |
| 7437 | ? newName |
| 7438 | : newName.substr( lastSlash+1 ); |
| 7439 | |
| 7440 | *m_name = filename; |
| 7441 | if( m_ref ) |
| 7442 | return m_ref->setValue( filename ); |
| 7443 | else |
| 7444 | return ParserResult::ok( ParseResultType::Matched ); |
| 7445 | } |
| 7446 | }; |
| 7447 | |
| 7448 | class Arg : public ParserRefImpl<Arg> { |