| 6101 | |
| 6102 | auto name() const -> std::string { return *m_name; } |
| 6103 | auto set( std::string const& newName ) -> ParserResult { |
| 6104 | |
| 6105 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 6106 | auto filename = ( lastSlash == std::string::npos ) |
| 6107 | ? newName |
| 6108 | : newName.substr( lastSlash+1 ); |
| 6109 | |
| 6110 | *m_name = filename; |
| 6111 | if( m_ref ) |
| 6112 | return m_ref->setValue( filename ); |
| 6113 | else |
| 6114 | return ParserResult::ok( ParseResultType::Matched ); |
| 6115 | } |
| 6116 | }; |
| 6117 | |
| 6118 | class Arg : public ParserRefImpl<Arg> { |