MCPcopy Create free account
hub / github.com/SpartanJ/eepp / processLine

Method processLine

src/eepp/ui/uiconsole.cpp:1600–1621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1598}
1599
1600void UIConsole::processLine() {
1601 String str( mDoc.getCurrentLine().getTextWithoutNewLine() );
1602 std::vector<String> params = splitCommandParams( str );
1603
1604 mLastCommands.push_back( str );
1605 mLastLogPos = (int)mLastCommands.size();
1606
1607 if ( mLastCommands.size() > 20 )
1608 mLastCommands.pop_front();
1609
1610 if ( str.size() > 0 ) {
1611 privPushText( "> " + str );
1612
1613 if ( mCallbacks.find( params[0] ) != mCallbacks.end() ) {
1614 mCallbacks[params[0]]( params );
1615 } else {
1616 privPushText( "Unknown Command: '" + params[0] + "'" );
1617 }
1618 }
1619 mDoc.replaceCurrentLine( "" );
1620 invalidateDraw();
1621}
1622
1623}} // namespace EE::UI

Callers

nothing calls this directly

Calls 6

splitCommandParamsFunction · 0.85
push_backMethod · 0.80
replaceCurrentLineMethod · 0.80
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected