Skip to content

Commit

Permalink
Update Sandbox API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Oct 21, 2024
1 parent aa31929 commit 341cefb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/godot_intro/cppprogram.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Also, after each update you will need to `docker pull` the container in order to
## The C++ API
The C++ API tries to mimick godot-cpp when it makes sense to do so. You can find [the C++ API implementation here](https://github.com/libriscv/godot-sandbox/tree/main/program/cpp/api), and [the C++ API reference here](cppapi.md).
The C++ API tries to mimick godot-cpp when it makes sense to do so. You can find [the C++ API implementation here](https://github.com/libriscv/godot-sandbox/tree/main/program/cpp/api), and [the C++ API reference here](../godot_docs/cppapi.md).
## ELF Script
Expand Down
10 changes: 10 additions & 0 deletions docs/godot_intro/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ class Sandbox : public Node {
/// @brief Check if a program has been loaded into the sandbox.
/// @return True if a program has been loaded, false otherwise.
bool has_program_loaded() const;

/// @brief Set the program to run in the sandbox.
/// @param program The program to load and run.
void set_program(Ref<ELFScript> program);

/// @brief Get the program loaded into the sandbox.
/// @return The program loaded into the sandbox.
Ref<ELFScript> get_program();
Expand All @@ -303,6 +305,14 @@ class Sandbox : public Node {

// -= Self-testing, inspection and internal functions =-

/// @brief Get the current Callable set for redirecting stdout.
/// @return The current Callable set for redirecting stdout.
const Callable &get_redirect_stdout() const;

/// @brief Set a Callable to redirect stdout from the guest program to.
/// @param callback The callable to redirect stdout.
void set_redirect_stdout(const Callable &callback);

/// @brief Get the 32 integer registers of the RISC-V machine.
/// @return An array of 32 registers.
Array get_general_registers() const;
Expand Down

0 comments on commit 341cefb

Please sign in to comment.