Skip to main content

System

The System namespace offers functions for system-level operations, including retrieving the current thread identifier, managing environment variables, and working with dynamic libraries. It also provides functionality for executing commands with exec, optionally waiting for completion, and opening resources or applications using the open function.

#include <core/TellusimSystem.h>

Functions

Thread identifier.

uint32_t getThreadID()

Environment variables.

bool setEnvironment(const char *name, const char *value)
bool setEnvironment(const String &name, const char *value)
String getEnvironment(const char *name)
String getEnvironment(const String &name)

Dynamic libraries.

void *loadLibrary(const char *name)
void *loadLibrary(const String &name)
void *getFunction(void *handle, const char *name)
void *getFunction(void *handle, const String &name)
void closeLibrary(void *handle)

Execute command.

int32_t exec(const char *command, bool wait = false, bool console = true)
int32_t exec(const String &command, bool wait = false, bool console = true)
TypeNameDescription
boolwaitWait for the process completion.
boolconsoleCreate process console window.

Open resource.

bool open(const char *command)
bool open(const String &command)