-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1459 from dgelessus/console_parsing
Refactor and add tests for console command parsing
- Loading branch information
Showing
11 changed files
with
1,151 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
|
||
#include "pfConsoleCmd.h" | ||
|
||
#include <string_theory/format> | ||
#include <string_theory/string_stream> | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
|
@@ -134,6 +135,15 @@ void pfConsoleCmdGroup::AddSubGroup( pfConsoleCmdGroup *group ) | |
fBaseCmdGroupRef++; | ||
} | ||
|
||
ST::string pfConsoleCmdGroup::GetFullName() | ||
{ | ||
if (fParentGroup == nullptr || fParentGroup == GetBaseGroup()) { | ||
return fName; | ||
} else { | ||
return ST::format("{}.{}", fParentGroup->GetFullName(), fName); | ||
} | ||
} | ||
|
||
//// FindCommand ///////////////////////////////////////////////////////////// | ||
// No longer recursive. | ||
|
||
|
@@ -446,6 +456,15 @@ void pfConsoleCmd::Unlink() | |
*fPrevPtr = fNext; | ||
} | ||
|
||
ST::string pfConsoleCmd::GetFullName() | ||
{ | ||
if (fParentGroup == pfConsoleCmdGroup::GetBaseGroup()) { | ||
return fName; | ||
} else { | ||
return ST::format("{}.{}", fParentGroup->GetFullName(), fName); | ||
} | ||
} | ||
|
||
//// GetSigEntry ///////////////////////////////////////////////////////////// | ||
|
||
uint8_t pfConsoleCmd::GetSigEntry(size_t i) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.