Phasor 2.2.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
Phasor::StdLib Class Reference

Standard library Contains all the standard library functions. More...

#include <StdLib.hpp>

Static Public Member Functions

static void registerFunctions (VM &vm)
 Register all standard library functions.
static void checkArgCount (const std::vector< Value > &args, size_t minimumArguments, const std::string &name, bool allowMoreArguments=false)

Static Public Attributes

static char ** argv = nullptr
 Command line arguments.
static int argc = 0
 Number of command line arguments.
static char ** envp = nullptr
 Environment variables.

Static Private Member Functions

static int dupenv (std::string &out, const char *name, char *const argp[])
static Value registerMathFunctions (const std::vector< Value > &args, VM *vm)
static Value registerStringFunctions (const std::vector< Value > &args, VM *vm)
static Value registerTypeConvFunctions (const std::vector< Value > &args, VM *vm)
static Value registerFileFunctions (const std::vector< Value > &args, VM *vm)
static Value registerSysFunctions (const std::vector< Value > &args, VM *vm)
static Value registerIOFunctions (const std::vector< Value > &args, VM *vm)
static Value registerRegexFunctions (const std::vector< Value > &args, VM *vm)
static Value math_sqrt (const std::vector< Value > &args, VM *vm)
 Square root.
static Value math_pow (const std::vector< Value > &args, VM *vm)
 Power.
static Value math_abs (const std::vector< Value > &args, VM *vm)
 Absolute value.
static Value math_floor (const std::vector< Value > &args, VM *vm)
 Floor.
static Value math_ceil (const std::vector< Value > &args, VM *vm)
 Ceiling.
static Value math_round (const std::vector< Value > &args, VM *vm)
 Round.
static Value math_min (const std::vector< Value > &args, VM *vm)
 Minimum.
static Value math_max (const std::vector< Value > &args, VM *vm)
 Maximum.
static Value math_log (const std::vector< Value > &args, VM *vm)
 Natural logarithm.
static Value math_exp (const std::vector< Value > &args, VM *vm)
 Exponential.
static Value math_sin (const std::vector< Value > &args, VM *vm)
 Sine.
static Value math_cos (const std::vector< Value > &args, VM *vm)
 Cosine.
static Value math_tan (const std::vector< Value > &args, VM *vm)
 Tangent.
static Value file_read (const std::vector< Value > &args, VM *vm)
 Read file.
static Value file_write (const std::vector< Value > &args, VM *vm)
 Write to file.
static Value file_exists (const std::vector< Value > &args, VM *vm)
 Check if file exists.
static Value file_read_line (const std::vector< Value > &args, VM *vm)
 Read a line from file.
static Value file_write_line (const std::vector< Value > &args, VM *vm)
 Write a line to file.
static Value file_append (const std::vector< Value > &args, VM *vm)
 Append to file.
static Value file_delete (const std::vector< Value > &args, VM *vm)
 Delete file.
static Value file_rename (const std::vector< Value > &args, VM *vm)
 Rename file.
static Value file_current_directory (const std::vector< Value > &args, VM *vm)
 Get/set working directory.
static Value file_copy (const std::vector< Value > &args, VM *vm)
 Copy file.
static Value file_move (const std::vector< Value > &args, VM *vm)
 Move file.
static Value file_property_edit (const std::vector< Value > &args, VM *vm)
static Value file_property_get (const std::vector< Value > &args, VM *vm)
static Value file_create (const std::vector< Value > &args, VM *vm)
static Value file_read_directory (const std::vector< Value > &args, VM *vm)
static Value file_statistics (const std::vector< Value > &args, VM *vm)
static Value file_create_directory (const std::vector< Value > &args, VM *vm)
static Value file_remove_directory (const std::vector< Value > &args, VM *vm)
static Value sys_time (const std::vector< Value > &args, VM *vm)
 Current time.
static Value sys_time_formatted (const std::vector< Value > &args, VM *vm)
 Current time formatted.
static Value sys_sleep (const std::vector< Value > &args, VM *vm)
 Sleep for a specified amount of time.
static Value sys_clear (const std::vector< Value > &args, VM *vm)
 Clear the console.
static Value sys_os (const std::vector< Value > &args, VM *vm)
 Get the current OS.
static Value sys_env (const std::vector< Value > &args, VM *vm)
 Get the current environment variables.
static Value sys_argv (const std::vector< Value > &args, VM *vm)
 Get the current command line arguments.
static Value system_get_free_memory (const std::vector< Value > &args, VM *vm)
 Get current free memory.
static Value sys_argc (const std::vector< Value > &args, VM *vm)
 Get the current number of command line arguments.
static Value sys_wait_for_input (const std::vector< Value > &args, VM *vm)
 Wait for input.
static Value sys_exec (const std::vector< Value > &args, VM *vm)
 Run a shell command.
static Value sys_exec_get_output (const std::vector< Value > &args, VM *vm)
 Run a shell command and get output.
static Value sys_exec_get_error (const std::vector< Value > &args, VM *vm)
 Run a shell command and get error output.
static Value sys_crash (const std::vector< Value > &args, VM *vm)
 Crash the VM / Program.
static Value sys_reset (const std::vector< Value > &args, VM *vm)
 Reset the VM.
static Value sys_shutdown (const std::vector< Value > &args, VM *vm)
 Shutdown the VM.
static Value sys_pid (const std::vector< Value > &args, VM *vm)
 Get the current process ID.
static Value to_int (const std::vector< Value > &args, VM *vm)
 Convert to integer.
static Value to_float (const std::vector< Value > &args, VM *vm)
 Convert to float.
static Value to_string (const std::vector< Value > &args, VM *vm)
 Convert to string.
static Value to_bool (const std::vector< Value > &args, VM *vm)
 Convert to boolean.
static Value str_len (const std::vector< Value > &args, VM *vm)
 Get string length.
static Value str_char_at (const std::vector< Value > &args, VM *vm)
 Get character at index.
static Value str_substr (const std::vector< Value > &args, VM *vm)
 Get substring.
static Value str_concat (const std::vector< Value > &args, VM *vm)
 Concatenate strings.
static Value str_upper (const std::vector< Value > &args, VM *vm)
 Convert to uppercase.
static Value str_lower (const std::vector< Value > &args, VM *vm)
 Convert to lowercase.
static Value str_starts_with (const std::vector< Value > &args, VM *vm)
 Check if string starts with.
static Value str_ends_with (const std::vector< Value > &args, VM *vm)
 Check if string ends with.
static Value sb_new (const std::vector< Value > &args, VM *vm)
 Create new string builder.
static Value sb_append (const std::vector< Value > &args, VM *vm)
 Append to string builder.
static Value sb_to_string (const std::vector< Value > &args, VM *vm)
 Convert string builder to string.
static Value sb_clear (const std::vector< Value > &args, VM *vm)
 Clear string builder.
static Value sb_free (const std::vector< Value > &args, VM *vm)
 Free string builder.
static Value io_c_format (const std::vector< Value > &args, VM *vm)
 Format string.
static Value io_prints (const std::vector< Value > &args, VM *vm)
 Print string without newline.
static Value io_printf (const std::vector< Value > &args, VM *vm)
 Print formatted string.
static Value io_puts (const std::vector< Value > &args, VM *vm)
 Print string with newline.
static Value io_putf (const std::vector< Value > &args, VM *vm)
 Print formatted string with newline.
static Value io_gets (const std::vector< Value > &args, VM *vm)
 Get string.
static Value io_putf_error (const std::vector< Value > &args, VM *vm)
 Print formatted string with newline to error output.
static Value io_puts_error (const std::vector< Value > &args, VM *vm)
 Print string with newline to error output.
static Value regex_match (const std::vector< Value > &args, VM *vm)
 Check if regex matches.
static Value regex_search (const std::vector< Value > &args, VM *vm)
 Check if regex is found.
static Value regex_findall (const std::vector< Value > &args, VM *vm)
 Find all regex matches.
static Value regex_split (const std::vector< Value > &args, VM *vm)
 Split string by regex matches.
static Value regex_replace (const std::vector< Value > &args, VM *vm)
 Replace regex matches.

Detailed Description

Standard library Contains all the standard library functions.

Definition at line 24 of file StdLib.hpp.

Member Function Documentation

◆ checkArgCount()

void Phasor::StdLib::checkArgCount ( const std::vector< Value > & args,
size_t minimumArguments,
const std::string & name,
bool allowMoreArguments = false )
static

Definition at line 50 of file StdLib.cpp.

◆ dupenv()

int Phasor::StdLib::dupenv ( std::string & out,
const char * name,
char *const argp[] )
staticprivate

Definition at line 21 of file StdLib.cpp.

Here is the caller graph for this function:

◆ file_append()

Value Phasor::StdLib::file_append ( const std::vector< Value > & args,
VM * vm )
staticprivate

Append to file.

Definition at line 137 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_copy()

Value Phasor::StdLib::file_copy ( const std::vector< Value > & args,
VM * vm )
staticprivate

Copy file.

Definition at line 193 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_create()

Value Phasor::StdLib::file_create ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 272 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_create_directory()

Value Phasor::StdLib::file_create_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 371 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_current_directory()

Value Phasor::StdLib::file_current_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get/set working directory.

Definition at line 175 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_delete()

Value Phasor::StdLib::file_delete ( const std::vector< Value > & args,
VM * vm )
staticprivate

Delete file.

Definition at line 150 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_exists()

Value Phasor::StdLib::file_exists ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if file exists.

Definition at line 131 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_move()

Value Phasor::StdLib::file_move ( const std::vector< Value > & args,
VM * vm )
staticprivate

Move file.

Definition at line 241 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_property_edit()

Value Phasor::StdLib::file_property_edit ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 251 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_property_get()

Value Phasor::StdLib::file_property_get ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 264 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_read()

Value Phasor::StdLib::file_read ( const std::vector< Value > & args,
VM * vm )
staticprivate

Read file.

Definition at line 35 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_read_directory()

Value Phasor::StdLib::file_read_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 285 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_read_line()

Value Phasor::StdLib::file_read_line ( const std::vector< Value > & args,
VM * vm )
staticprivate

Read a line from file.

Definition at line 49 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_remove_directory()

Value Phasor::StdLib::file_remove_directory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 381 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_rename()

Value Phasor::StdLib::file_rename ( const std::vector< Value > & args,
VM * vm )
staticprivate

Rename file.

Definition at line 162 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_statistics()

Value Phasor::StdLib::file_statistics ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 306 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_write()

Value Phasor::StdLib::file_write ( const std::vector< Value > & args,
VM * vm )
staticprivate

Write to file.

Definition at line 118 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_write_line()

Value Phasor::StdLib::file_write_line ( const std::vector< Value > & args,
VM * vm )
staticprivate

Write a line to file.

Definition at line 68 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_c_format()

Value Phasor::StdLib::io_c_format ( const std::vector< Value > & args,
VM * vm )
staticprivate

Format string.

Definition at line 20 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_gets()

Value Phasor::StdLib::io_gets ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get string.

Definition at line 97 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_printf()

Value Phasor::StdLib::io_printf ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string.

Definition at line 69 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_prints()

Value Phasor::StdLib::io_prints ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string without newline.

Definition at line 61 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_putf()

Value Phasor::StdLib::io_putf ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string with newline.

Definition at line 87 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_putf_error()

Value Phasor::StdLib::io_putf_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print formatted string with newline to error output.

Definition at line 113 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_puts()

Value Phasor::StdLib::io_puts ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string with newline.

Definition at line 78 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_puts_error()

Value Phasor::StdLib::io_puts_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Print string with newline to error output.

Definition at line 105 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_abs()

Value Phasor::StdLib::math_abs ( const std::vector< Value > & args,
VM * vm )
staticprivate

Absolute value.

Definition at line 40 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_ceil()

Value Phasor::StdLib::math_ceil ( const std::vector< Value > & args,
VM * vm )
staticprivate

Ceiling.

Definition at line 56 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_cos()

Value Phasor::StdLib::math_cos ( const std::vector< Value > & args,
VM * vm )
staticprivate

Cosine.

Definition at line 128 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_exp()

Value Phasor::StdLib::math_exp ( const std::vector< Value > & args,
VM * vm )
staticprivate

Exponential.

Definition at line 116 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_floor()

Value Phasor::StdLib::math_floor ( const std::vector< Value > & args,
VM * vm )
staticprivate

Floor.

Definition at line 49 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_log()

Value Phasor::StdLib::math_log ( const std::vector< Value > & args,
VM * vm )
staticprivate

Natural logarithm.

Definition at line 110 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_max()

Value Phasor::StdLib::math_max ( const std::vector< Value > & args,
VM * vm )
staticprivate

Maximum.

Definition at line 90 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_min()

Value Phasor::StdLib::math_min ( const std::vector< Value > & args,
VM * vm )
staticprivate

Minimum.

Definition at line 70 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_pow()

Value Phasor::StdLib::math_pow ( const std::vector< Value > & args,
VM * vm )
staticprivate

Power.

Definition at line 32 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_round()

Value Phasor::StdLib::math_round ( const std::vector< Value > & args,
VM * vm )
staticprivate

Round.

Definition at line 63 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_sin()

Value Phasor::StdLib::math_sin ( const std::vector< Value > & args,
VM * vm )
staticprivate

Sine.

Definition at line 122 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_sqrt()

Value Phasor::StdLib::math_sqrt ( const std::vector< Value > & args,
VM * vm )
staticprivate

Square root.

Definition at line 26 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_tan()

Value Phasor::StdLib::math_tan ( const std::vector< Value > & args,
VM * vm )
staticprivate

Tangent.

Definition at line 134 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ regex_findall()

Value Phasor::StdLib::regex_findall ( const std::vector< Value > & args,
VM * vm )
staticprivate

Find all regex matches.

Definition at line 94 of file regex.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ regex_match()

Value Phasor::StdLib::regex_match ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if regex matches.

Definition at line 22 of file regex.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ regex_replace()

Value Phasor::StdLib::regex_replace ( const std::vector< Value > & args,
VM * vm )
staticprivate

Replace regex matches.

Definition at line 192 of file regex.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ regex_search()

Value Phasor::StdLib::regex_search ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if regex is found.

Definition at line 43 of file regex.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ regex_split()

Value Phasor::StdLib::regex_split ( const std::vector< Value > & args,
VM * vm )
staticprivate

Split string by regex matches.

Definition at line 136 of file regex.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerFileFunctions()

Value Phasor::StdLib::registerFileFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 10 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerFunctions()

void Phasor::StdLib::registerFunctions ( VM & vm)
static

Register all standard library functions.

Definition at line 10 of file StdLib.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerIOFunctions()

Value Phasor::StdLib::registerIOFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 6 of file io.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerMathFunctions()

Value Phasor::StdLib::registerMathFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 7 of file math.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerRegexFunctions()

Value Phasor::StdLib::registerRegexFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 8 of file regex.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerStringFunctions()

Value Phasor::StdLib::registerStringFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 7 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerSysFunctions()

Value Phasor::StdLib::registerSysFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 20 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerTypeConvFunctions()

Value Phasor::StdLib::registerTypeConvFunctions ( const std::vector< Value > & args,
VM * vm )
staticprivate

Definition at line 6 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_append()

Value Phasor::StdLib::sb_append ( const std::vector< Value > & args,
VM * vm )
staticprivate

Append to string builder.

Definition at line 50 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_clear()

Value Phasor::StdLib::sb_clear ( const std::vector< Value > & args,
VM * vm )
staticprivate

Clear string builder.

Definition at line 80 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_free()

Value Phasor::StdLib::sb_free ( const std::vector< Value > & args,
VM * vm )
staticprivate

Free string builder.

Definition at line 71 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_new()

Value Phasor::StdLib::sb_new ( const std::vector< Value > & args,
VM * vm )
staticprivate

Create new string builder.

Definition at line 32 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sb_to_string()

Value Phasor::StdLib::sb_to_string ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert string builder to string.

Definition at line 61 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_char_at()

Value Phasor::StdLib::str_char_at ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get character at index.

Definition at line 90 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_concat()

Value Phasor::StdLib::str_concat ( const std::vector< Value > & args,
VM * vm )
staticprivate

Concatenate strings.

Definition at line 123 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_ends_with()

Value Phasor::StdLib::str_ends_with ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if string ends with.

Definition at line 169 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_len()

Value Phasor::StdLib::str_len ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get string length.

Definition at line 134 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_lower()

Value Phasor::StdLib::str_lower ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to lowercase.

Definition at line 149 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_starts_with()

Value Phasor::StdLib::str_starts_with ( const std::vector< Value > & args,
VM * vm )
staticprivate

Check if string starts with.

Definition at line 157 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_substr()

Value Phasor::StdLib::str_substr ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get substring.

Definition at line 104 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_upper()

Value Phasor::StdLib::str_upper ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to uppercase.

Definition at line 141 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_argc()

Value Phasor::StdLib::sys_argc ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current number of command line arguments.

Definition at line 140 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_argv()

Value Phasor::StdLib::sys_argv ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current command line arguments.

Definition at line 118 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_clear()

Value Phasor::StdLib::sys_clear ( const std::vector< Value > & args,
VM * vm )
staticprivate

Clear the console.

Definition at line 84 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_crash()

Value Phasor::StdLib::sys_crash ( const std::vector< Value > & args,
VM * vm )
staticprivate

Crash the VM / Program.

Definition at line 180 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_env()

Value Phasor::StdLib::sys_env ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current environment variables.

Definition at line 109 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_exec()

Value Phasor::StdLib::sys_exec ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a shell command.

Definition at line 159 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_exec_get_error()

Value Phasor::StdLib::sys_exec_get_error ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a shell command and get error output.

Definition at line 173 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_exec_get_output()

Value Phasor::StdLib::sys_exec_get_output ( const std::vector< Value > & args,
VM * vm )
staticprivate

Run a shell command and get output.

Definition at line 166 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_os()

Value Phasor::StdLib::sys_os ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current OS.

Definition at line 90 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_pid()

Value Phasor::StdLib::sys_pid ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get the current process ID.

Definition at line 203 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_reset()

Value Phasor::StdLib::sys_reset ( const std::vector< Value > & args,
VM * vm )
staticprivate

Reset the VM.

Definition at line 187 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_shutdown()

Value Phasor::StdLib::sys_shutdown ( const std::vector< Value > & args,
VM * vm )
staticprivate

Shutdown the VM.

Definition at line 194 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_sleep()

Value Phasor::StdLib::sys_sleep ( const std::vector< Value > & args,
VM * vm )
staticprivate

Sleep for a specified amount of time.

Definition at line 76 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_time()

Value Phasor::StdLib::sys_time ( const std::vector< Value > & args,
VM * vm )
staticprivate

Current time.

Definition at line 43 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_time_formatted()

Value Phasor::StdLib::sys_time_formatted ( const std::vector< Value > & args,
VM * vm )
staticprivate

Current time formatted.

Definition at line 52 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_wait_for_input()

Value Phasor::StdLib::sys_wait_for_input ( const std::vector< Value > & args,
VM * vm )
staticprivate

Wait for input.

Definition at line 152 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ system_get_free_memory()

Value Phasor::StdLib::system_get_free_memory ( const std::vector< Value > & args,
VM * vm )
staticprivate

Get current free memory.

Definition at line 146 of file system.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_bool()

Value Phasor::StdLib::to_bool ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to boolean.

Definition at line 51 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_float()

Value Phasor::StdLib::to_float ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to float.

Definition at line 39 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_int()

Value Phasor::StdLib::to_int ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to integer.

Definition at line 16 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_string()

Value Phasor::StdLib::to_string ( const std::vector< Value > & args,
VM * vm )
staticprivate

Convert to string.

Definition at line 45 of file typeconv.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ argc

int Phasor::StdLib::argc = 0
static

Number of command line arguments.

Definition at line 31 of file StdLib.hpp.

◆ argv

char ** Phasor::StdLib::argv = nullptr
static

Command line arguments.

Definition at line 30 of file StdLib.hpp.

◆ envp

char ** Phasor::StdLib::envp = nullptr
static

Environment variables.

Definition at line 32 of file StdLib.hpp.


The documentation for this class was generated from the following files: