| 9239 | |
| 9240 | auto name() const -> std::string { return *m_name; } |
| 9241 | auto set( std::string const& newName ) -> ParserResult { |
| 9242 | |
| 9243 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 9244 | auto filename = ( lastSlash == std::string::npos ) |
| 9245 | ? newName |
| 9246 | : newName.substr( lastSlash+1 ); |
| 9247 | |
| 9248 | *m_name = filename; |
| 9249 | if( m_ref ) |
| 9250 | return m_ref->setValue( filename ); |
| 9251 | else |
| 9252 | return ParserResult::ok( ParseResultType::Matched ); |
| 9253 | } |
| 9254 | }; |
| 9255 | |
| 9256 | class Arg : public ParserRefImpl<Arg> { |