MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetCommandFlags

Method GetCommandFlags

Source/Engine/Debug/DebugCommands.cpp:475–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475DebugCommands::CommandFlags DebugCommands::GetCommandFlags(StringView command)
476{
477 CommandFlags result = CommandFlags::None;
478 if (command.FindLast(' ') != -1)
479 command = command.Left(command.Find(' '));
480 // TODO: fix missing string handle on 1st command execution (command gets invalid after InitCommands due to dotnet GC or dotnet interop handles flush)
481 String commandCopy = command;
482 command = commandCopy;
483 EnsureInited();
484 for (auto& e : Commands)
485 {
486 if (e.Name == command)
487 {
488 if (e.Method)
489 result |= CommandFlags::Exec;
490 else if (e.Field)
491 result |= CommandFlags::ReadWrite;
492 if (e.MethodGet)
493 result |= CommandFlags::Read;
494 if (e.MethodSet)
495 result |= CommandFlags::Write;
496 break;
497 }
498 }
499 return result;
500}
501
502bool DebugCommands::Iterate(const StringView& searchText, int32& index)
503{

Callers 1

ShowPopupMethod · 0.80

Calls 4

EnsureInitedFunction · 0.85
LeftMethod · 0.80
FindLastMethod · 0.45
FindMethod · 0.45

Tested by

no test coverage detected