NewLang Project
Yet another programm language
Loading...
Searching...
No Matches
newlang::runtime::System Class Reference

#include <system.h>

Inheritance diagram for newlang::runtime::System:

Public Member Functions

 System (RuntimePtr rt)
 
virtual ~System ()
 

Static Public Member Functions

static newlang::ObjPtr getname (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getlogin (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getenv (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getmillisec (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr gettimeofday (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getuname (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getsysinfo (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getenviron (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr getcwd (newlang::Context *ctx, newlang::Obj &in)
 
static newlang::ObjPtr system (newlang::Context *ctx, newlang::Obj &in)
 

Additional Inherited Members

- Protected Member Functions inherited from newlang::runtime::Buildin
 Buildin (RuntimePtr rt, ObjType type, const char *name=nullptr)
 
bool CreateMethod (const char *proto, FunctionType &func, ObjType type=ObjType::Function)
 
bool CreateMethodNative (const char *proto, void *addr)
 
bool AddMethod (const char *name, ObjPtr obj)
 

Detailed Description

Definition at line 225 of file system.h.

Constructor & Destructor Documentation

◆ System()

◆ ~System()

virtual newlang::runtime::System::~System ( )
inlinevirtual

Definition at line 258 of file system.h.

Member Function Documentation

◆ getname()

newlang::ObjPtr System::getname ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 176 of file system.cpp.

References newlang::Obj::CreateString().

Referenced by System().

◆ getlogin()

newlang::ObjPtr System::getlogin ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 184 of file system.cpp.

References newlang::Obj::CreateString().

Referenced by System().

◆ getenv()

newlang::ObjPtr System::getenv ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 200 of file system.cpp.

References ARG_TEST_COUNT, newlang::Obj::CreateString(), LOG_RUNTIME, and newlang::toString().

Referenced by System().

◆ getmillisec()

newlang::ObjPtr System::getmillisec ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 258 of file system.cpp.

References newlang::Obj::CreateValue().

Referenced by System().

◆ gettimeofday()

newlang::ObjPtr System::gettimeofday ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 264 of file system.cpp.

References newlang::Obj::CreateDict(), newlang::Obj::CreateValue(), and result.

Referenced by System().

◆ getuname()

newlang::ObjPtr System::getuname ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 210 of file system.cpp.

References newlang::Obj::CreateDict(), newlang::Obj::CreateString(), LOG_RUNTIME, and result.

Referenced by System().

◆ getsysinfo()

newlang::ObjPtr System::getsysinfo ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 229 of file system.cpp.

References newlang::Obj::CreateDict(), CreateTensor(), newlang::Obj::CreateValue(), LOG_RUNTIME, and result.

Referenced by System().

◆ getenviron()

newlang::ObjPtr System::getenviron ( newlang::Context * ctx,
newlang::Obj & in )
static

◆ getcwd()

newlang::ObjPtr System::getcwd ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 275 of file system.cpp.

References newlang::Obj::CreateString().

Referenced by System().

◆ system()

newlang::ObjPtr System::system ( newlang::Context * ctx,
newlang::Obj & in )
static

Definition at line 306 of file system.cpp.

References ARG_TEST_COUNT, newlang::Obj::CreateString(), LOG_RUNTIME, result, and newlang::toString().

Referenced by System().


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