| 9006 | |
| 9007 | auto name() const -> std::string { return *m_name; } |
| 9008 | auto set( std::string const& newName ) -> ParserResult { |
| 9009 | |
| 9010 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 9011 | auto filename = ( lastSlash == std::string::npos ) |
| 9012 | ? newName |
| 9013 | : newName.substr( lastSlash+1 ); |
| 9014 | |
| 9015 | *m_name = filename; |
| 9016 | if( m_ref ) |
| 9017 | return m_ref->setValue( filename ); |
| 9018 | else |
| 9019 | return ParserResult::ok( ParseResultType::Matched ); |
| 9020 | } |
| 9021 | }; |
| 9022 | |
| 9023 | class Arg : public ParserRefImpl<Arg> { |