Skip to content

Commit

Permalink
Documentation for stream-related functionalities on VM.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed May 14, 2024
1 parent c9385e3 commit 3761b3f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/rishka_vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,37 @@ class RishkaVM final {
*/
String getWorkingDirectory() const;

/**
* @brief Retrieves the current output stream of the virtual machine.
*
* This method returns the entire content of the virtual machine's output stream as a String.
* The output stream contains all the text that has been written to the virtual machine's
* output during its execution.
*
* @return A String containing the content of the output stream.
*/
String getOutputStream() const;

/**
* @brief Appends a text string to the virtual machine's output stream.
*
* This method allows you to add a specified text string to the end of the virtual machine's
* output stream. This can be useful for logging or for any output generation during the
* virtual machine's execution.
*
* @param text The text string to be appended to the output stream.
*/
void appendToOutputStream(String text);

/**
* @brief Appends a single character to the virtual machine's output stream.
*
* This method allows you to add a single character to the end of the virtual machine's
* output stream. This can be useful for logging or for any output generation during the
* virtual machine's execution.
*
* @param ch The character to be appended to the output stream.
*/
void appendToOutputStream(char ch);

/**
Expand Down

0 comments on commit 3761b3f

Please sign in to comment.