MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / set

Method set

tests/catch.hpp:7214–7226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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> {

Callers 1

parseMethod · 0.80

Calls 2

substrMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected