| 9257 | |
| 9258 | auto name() const -> std::string { return *m_name; } |
| 9259 | auto set( std::string const& newName ) -> ParserResult { |
| 9260 | |
| 9261 | auto lastSlash = newName.find_last_of( "\\/" ); |
| 9262 | auto filename = ( lastSlash == std::string::npos ) |
| 9263 | ? newName |
| 9264 | : newName.substr( lastSlash+1 ); |
| 9265 | |
| 9266 | *m_name = filename; |
| 9267 | if( m_ref ) |
| 9268 | return m_ref->setValue( filename ); |
| 9269 | else |
| 9270 | return ParserResult::ok( ParseResultType::Matched ); |
| 9271 | } |
| 9272 | }; |
| 9273 | |
| 9274 | class Arg : public ParserRefImpl<Arg> { |
no test coverage detected