| 7212 | |
| 7213 | auto name() const -> std::string { return *m_name; } |
| 7214 | auto set( std::string const& newName ) -> ParserResult { |
| 7215 | |
| 7216 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 7217 | auto filename = ( lastSlash == std::string::npos ) |
| 7218 | ? newName |
| 7219 | : newName.substr( lastSlash+1 ); |
| 7220 | |
| 7221 | *m_name = filename; |
| 7222 | if( m_ref ) |
| 7223 | return m_ref->setValue( filename ); |
| 7224 | else |
| 7225 | return ParserResult::ok( ParseResultType::Matched ); |
| 7226 | } |
| 7227 | }; |
| 7228 | |
| 7229 | class Arg : public ParserRefImpl<Arg> { |