SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND


Namespace Platform::Runtime

namespace Platform::Runtime

Provides operations and constructs allowing a program to interact with its run-time environment.

Inner Compounds, Typedefs, and Enumscollapse
class AssertHandler
          Sets the specified global assert handler in the current scope.
class Environment
          Represents the system environment.
class ErrorHandler
          Sets the specified global error handler in the current scope.
class FileSystem
          Provides support for file system operations.
struct StdOut
          Standard Output printer.
class TerminateExceptionHandler
          Sets the specified global terminate exception handler in the current scope.
class UnexpectedExceptionHandler
          Sets the specified global unexpected exception handler in the current scope.
typedef AssertFunction
          Definition of the assert handler function.
typedef ErrorFunction
          Definition of the error handler function.
typedef ModuleHandle
          Represents a load module handle.
enum Error
          Error codes defined by the platform.

Method Summarycollapse
String currentDirectory()
          Retrieves the fully qualified path of the current working directory.
Long currentTimeMillis()
          Retrieves the current time in milliseconds since January 1, 1970, 00:00:00 GMT.
Void* getSymbolAddress(ModuleHandle module, const LatinChar* name)
          Retrieves an address of the specified symbol in the given module.
void* getSymbolAddressC(void* module, const char* name)
          Retrieves an address of the specified symbol in the given module.
Bool isBigEndian()
          Tests whether the application runs on a big-endian system.
Bool isLittleEndian()
          Tests whether the application runs on a little-endian system.
Int lastError()
          Retrieves the last system error code for the calling thread.
ModuleHandle loadModule(const LatinChar* name)
          Loads an external module (.dll on Windows, .so on unix systems) with the specified name.
String machineAbsoluteDomainName()
          Retrieves the Fully Qualified Domain Name (FQDN) of the local host.
Net::IPv4::Address machineIPv4Address()
          Retrieves the IPv4 address of the local host.
Containers::Array<Net::IPv4::Address> machineIPv4Addresses()
          Retrieves all the IPv4 addresses of the local host.
Net::IPv6::Address machineIPv6Address()
          Retrieves the IPv6 address of the local host.
Containers::Array<Net::IPv6::Address> machineIPv6Addresses()
          Retrieves all the IPv6 addresses of the local host.
ULong machineMemoryAvailable()
          Retrieves the approximate amount of available free memory in bytes.
ULong machineMemoryTotal()
          Retrieves the total amount of available memory in bytes.
String machineName()
          Retrieves the name of the local host.
Int machinePageSize()
          Retrieves the page size of the system in bytes.
Int machineProcessorCount()
          Retrieves the number of available processing units (CPUs or Cores on multi-core machines).
Long nanoTime()
          Retrieves the current value of the most precise timer available in the system, in nanoseconds.
AssertFunction setAssertHandler(AssertFunction handler)
          Sets the global assert handler function and returns the one which was set prior to this call.
ErrorFunction setErrorHandler(ErrorFunction handler)
          Sets the global error handler function and returns the one which was set prior to this call.
String tempDirectory()
          Retrieves the fully qualified path of the temporary directory.
Void unloadModule(ModuleHandle module)
          Unloads a previously loaded module.
String userDirectory()
          Retrieves the fully qualified path of the currently logged on user's home directory.

 

Method Detail

currentDirectory[nothrow]

String currentDirectory()

Retrieves the fully qualified path of the current working directory.

Returns:
the path of the current working directory

currentTimeMillis[nothrow]

Long currentTimeMillis()

Retrieves the current time in milliseconds since January 1, 1970, 00:00:00 GMT.

Returns:
the current time in milliseconds since January 1, 1970, 00:00:00 GMT
See Also:
DateTime

getSymbolAddress[nothrow]

Void* getSymbolAddress(ModuleHandle module, const LatinChar* name)

Retrieves an address of the specified symbol in the given module.

Parameters:
module - a previously loaded module
name - the name of the symbol
Returns:
the address of the symbol if it is found in the module, Null otherwise

getSymbolAddressC

void* getSymbolAddressC(void* module, const char* name)

Retrieves an address of the specified symbol in the given module.

Parameters:
module - a previously loaded module
name - the name of the symbol
Returns:
the address of the symbol if it is found in the module, Null otherwise

isBigEndian[inline]

Bool isBigEndian()

Tests whether the application runs on a big-endian system.

Returns:
True if the application runs on a big-endian system, False otherwise

isLittleEndian[inline]

Bool isLittleEndian()

Tests whether the application runs on a little-endian system.

Returns:
True if the application runs on a little-endian system, False otherwise

lastError[nothrow]

Int lastError()

Retrieves the last system error code for the calling thread. System error codes are different between Windows and Unix based systems.

Returns:
the last system error code for the calling thread

loadModule[nothrow]

ModuleHandle loadModule(const LatinChar* name)

Loads an external module (.dll on Windows, .so on unix systems) with the specified name.

Parameters:
name - the file name of the module to load, including extension
Returns:
the handle of the module if it was found and loaded successfully, Null otherwise
Remarks:
on Windows based systems, using Null as the name argument returns the handle to kernel32.dll

machineAbsoluteDomainName[nothrow]

String machineAbsoluteDomainName()

Retrieves the Fully Qualified Domain Name (FQDN) of the local host.

Returns:
the Fully Qualified Domain Name (FQDN) of the computer

machineIPv4Address[inline]

Net::IPv4::Address machineIPv4Address()

Retrieves the IPv4 address of the local host.

Returns:
the IPv4 address of the local host

machineIPv4Addresses[nothrow]

Containers::Array<Net::IPv4::Address> machineIPv4Addresses()

Retrieves all the IPv4 addresses of the local host.

Returns:
all the IPv4 addresses associated with the local host

machineIPv6Address[inline]

Net::IPv6::Address machineIPv6Address()

Retrieves the IPv6 address of the local host.

Returns:
the IPv6 address of the local host

machineIPv6Addresses[nothrow]

Containers::Array<Net::IPv6::Address> machineIPv6Addresses()

Retrieves all the IPv6 addresses of the local host.

Returns:
the IPv6 addresses associated with the local host

machineMemoryAvailable[nothrow]

ULong machineMemoryAvailable()

Retrieves the approximate amount of available free memory in bytes.

Returns:
the approximate amount of available free memory in bytes

machineMemoryTotal[nothrow]

ULong machineMemoryTotal()

Retrieves the total amount of available memory in bytes.

Returns:
the total amount of available memory in bytes

machineName[nothrow]

String machineName()

Retrieves the name of the local host.

Returns:
the name of the computer

machinePageSize[nothrow]

Int machinePageSize()

Retrieves the page size of the system in bytes.

Returns:
the page size of the system in bytes

machineProcessorCount[nothrow]

Int machineProcessorCount()

Retrieves the number of available processing units (CPUs or Cores on multi-core machines).

Returns:
the number of available processing units

nanoTime[nothrow]

Long nanoTime()

Retrieves the current value of the most precise timer available in the system, in nanoseconds.

Returns:
the current value of the most precise timer available in the system, in nanoseconds

setAssertHandler[nothrow]

AssertFunction setAssertHandler(AssertFunction handler)

Sets the global assert handler function and returns the one which was set prior to this call.

Parameters:
handler - the assert handler function
Returns:
the previously installed assert handler function

setErrorHandler[nothrow]

ErrorFunction setErrorHandler(ErrorFunction handler)

Sets the global error handler function and returns the one which was set prior to this call.

Parameters:
handler - the error handler function
Returns:
the previously installed error handler function

tempDirectory[nothrow]

String tempDirectory()

Retrieves the fully qualified path of the temporary directory.

Returns:
the path of the temporary directory

unloadModule[nothrow]

Void unloadModule(ModuleHandle module)

Unloads a previously loaded module.

Parameters:
module - the module to unload

userDirectory[nothrow]

String userDirectory()

Retrieves the fully qualified path of the currently logged on user's home directory.

Returns:
the path of the currently logged on user's home directory


SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND