OpenMS
Loading...
Searching...
No Matches
ToolHandler.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/APPLICATIONS/OpenMS_CLIConfig.h>
12
16
17#include <map>
18
19
20namespace OpenMS
21{
48 typedef std::map<std::string, Internal::ToolDescription> ToolListType;
49
50 class OPENMS_CLI_DLLAPI ToolHandler
51 {
52public:
53
68
78 static StringList getTypes(const std::string& toolname);
79
86 static std::string getCategory(const std::string& toolname);
87
92 static std::string getInternalToolsPath();
93
94private:
95
97 static std::vector<Internal::ToolDescription> getInternalTools_();
98
101
104
106 static std::vector<Internal::ToolDescription> tools_internal_;
107
110 };
111
112} // namespace OpenMS
Definition ToolHandler.h:51
static std::string getCategory(const std::string &toolname)
Return the category string of a tool.
static StringList getInternalToolConfigFiles_()
Enumerate .ttd config file paths under getInternalToolsPath (and its OS-specific subdir)
static ToolListType getTOPPToolList()
List every TOPP tool enabled in this build, keyed by tool name.
static bool tools_internal_loaded_
Whether tools_internal_ has been initialised this run.
Definition ToolHandler.h:109
static std::vector< Internal::ToolDescription > tools_internal_
Cached internal tool registry; populated lazily by loadInternalToolConfig_.
Definition ToolHandler.h:106
static StringList getTypes(const std::string &toolname)
Return the alternative "types" / sub-commands a tool supports, or an empty list if it has none.
static std::string getInternalToolsPath()
Resolved file-system path of the internal-tool config directory (root of the .ttd search).
static std::vector< Internal::ToolDescription > getInternalTools_()
Lazily load the internal tool registry from .ttd files under getInternalToolsPath.
static void loadInternalToolConfig_()
Parse the .ttd config files (idempotent — sets tools_internal_loaded_ on success)
std::vector< std::string > StringList
Vector of String.
Definition TypeAliases.h:39
std::map< std::string, Internal::ToolDescription > ToolListType
Registry of TOPP tools and their TOPPAS categories.
Definition ToolHandler.h:48
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19