Update Doxygen docs for util namespace

This commit is contained in:
Bartek Kryza
2023-06-25 17:53:02 +02:00
parent f1250e5780
commit 46b8c29907
11 changed files with 204 additions and 56 deletions

View File

@@ -23,26 +23,58 @@
namespace clanguml::util {
class query_driver_no_paths : public std::runtime_error {
using std::runtime_error::runtime_error;
};
/**
* @brief Executed compiler frontend and extract default system paths
*
* This class - inspired by the `clangd` language server - will invoke the
* provided compiler command and query it for its default system paths,
* which then will be added to each compile command in the database.
*/
class query_driver_output_extractor {
public:
/**
* @brief Constructor.
*
* @param command Command to execute the compiler frontend
* @param language Language name to query for (C or C++)
*/
query_driver_output_extractor(std::string command, std::string language);
~query_driver_output_extractor() = default;
/**
* @brief Execute the command and extract compiler flags and include paths
*/
void execute();
/**
* @brief Extract target name from the compiler output
*
* @param output Compiler query driver output
*/
void extract_target(const std::string &output);
/**
* @brief Extract system include paths from the compiler output
*
* @param output Compiler query driver output
*/
void extract_system_include_paths(const std::string &output);
const std::vector<std::string> &system_include_paths() const;
/**
* @brief Name of the target of the compiler command (e.g. x86_64-linux-gnu)
*
* @return Target name
*/
const std::string &target() const;
/**
* @brief Return list of include system paths
*
* @return List of include system paths
*/
const std::vector<std::string> &system_include_paths() const;
private:
const std::string command_;
const std::string language_;