mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
Merge pull request #211 from slsdetectorgroup/depdoc
Include depreciated commands in documentation
This commit is contained in:
commit
11a9d5bd4b
@ -30,3 +30,18 @@ Commands
|
||||
-----------
|
||||
|
||||
.. include:: ../commands.rst
|
||||
|
||||
|
||||
Depreciated commands
|
||||
------------------------
|
||||
|
||||
.. note ::
|
||||
All dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
|
||||
|
||||
.. csv-table:: Depreciated commands
|
||||
:file: ../depreciated.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
|
||||
|
||||
|
@ -51,4 +51,11 @@ int main() {
|
||||
auto help = replace_all(tmp, "\n\t", "\n\t\t| ");
|
||||
fs << '\t' << cmd << usage << help << "\n";
|
||||
}
|
||||
|
||||
std::ofstream fs2("depreciated.csv");
|
||||
fs2 << "Old, New\n";
|
||||
auto cmds = proxy.GetDepreciatedCommands();
|
||||
for (auto it : cmds){
|
||||
fs2 << it.first << ", " << it.second << '\n';
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +74,10 @@ std::vector<std::string> CmdProxy::GetProxyCommands() {
|
||||
return commands;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> CmdProxy::GetDepreciatedCommands(){
|
||||
return depreciated_functions;
|
||||
}
|
||||
|
||||
void CmdProxy::WrongNumberOfParameters(size_t expected) {
|
||||
throw RuntimeError(
|
||||
"Command " + cmd + " expected <=" + std::to_string(expected) +
|
||||
|
@ -534,6 +534,7 @@ class CmdProxy {
|
||||
bool ReplaceIfDepreciated(std::string &command);
|
||||
size_t GetFunctionMapSize() const noexcept { return functions.size(); };
|
||||
std::vector<std::string> GetProxyCommands();
|
||||
std::map<std::string, std::string> GetDepreciatedCommands();
|
||||
|
||||
private:
|
||||
Detector *det;
|
||||
|
Loading…
x
Reference in New Issue
Block a user