nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
help.hpp
Go to the documentation of this file.
1
3#pragma once
4
5#include <nk/bundle/help/help_catalog.hpp>
6#include <nk/value/value.hpp>
7#include <nk/value/span.hpp>
8
9#include <memory_resource>
10#include <string>
11#include <vector>
12
13namespace nk {
14class Engine;
15}
16
17namespace nk::bundle {
18
21
24public:
27 static void install(Engine &engine);
28};
29
32inline void registerHelpLibrary(Engine &engine)
33{
35}
36
37// ── C++ Public API ──────────────────────────────────────────────────────────
38
43std::string help(const std::string &query = "");
44
49Value help(Span<const Value> args, std::pmr::memory_resource *mr = nullptr);
50
55std::vector<std::string> what(const std::string &category = "elmat");
56
61Value what(Span<const Value> args, std::pmr::memory_resource *mr = nullptr);
62
67std::vector<std::string> builtins(const std::string &category = "");
68
73Value builtins(Span<const Value> args, std::pmr::memory_resource *mr = nullptr);
74
78std::vector<std::string> categories();
79
83Value categories(std::pmr::memory_resource *mr);
84
85
87} // namespace nk::bundle
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Installs MATLAB-compatible help and documentation commands into the script Engine.
Definition help.hpp:23
static void install(Engine &engine)
Registers help, doc, what, builtins, categories, and inmem in the given engine.
std::vector< std::string > what(const std::string &category="elmat")
Lists all functions in specified category (what category).
void registerHelpLibrary(Engine &engine)
Convenience alias to install help system into an engine.
Definition help.hpp:32
std::vector< std::string > builtins(const std::string &category="")
Lists all built-in functions registered in the system or specified category (builtins).
std::string help(const std::string &query="")
Formats help text or catalog index for given function or topic name (help query).
std::vector< std::string > categories()
Lists all registered documentation categories (categories).