18 #ifndef _DECAF_LANG_SYSTEM_H_ 19 #define _DECAF_LANG_SYSTEM_H_ 44 static SystemData* sys;
74 static void arraycopy(
const char* src, std::size_t srcPos,
75 char* dest, std::size_t destPos, std::size_t length );
95 static void arraycopy(
const unsigned char* src, std::size_t srcPos,
96 unsigned char* dest, std::size_t destPos, std::size_t length );
116 static void arraycopy(
const short* src, std::size_t srcPos,
117 short* dest, std::size_t destPos, std::size_t length );
137 static void arraycopy(
const int* src, std::size_t srcPos,
138 int* dest, std::size_t destPos, std::size_t length );
158 static void arraycopy(
const long long* src, std::size_t srcPos,
159 long long* dest, std::size_t destPos, std::size_t length );
179 static void arraycopy(
const float* src, std::size_t srcPos,
180 float* dest, std::size_t destPos, std::size_t length );
200 static void arraycopy(
const double* src, std::size_t srcPos,
201 double* dest, std::size_t destPos, std::size_t length );
221 template<
typename E >
222 static void arraycopy(
const E* src, std::size_t srcPos,
223 E* dest, std::size_t destPos, std::size_t length ) {
227 __FILE__, __LINE__,
"Given Source Pointer was null." );
232 __FILE__, __LINE__,
"Given Source Pointer was null." );
235 for( std::size_t i = 0; i < length; ++i ) {
236 dest[destPos+i] = src[srcPos+i];
261 static std::string getenv(
const std::string& name );
271 static void unsetenv(
const std::string& name );
283 static void setenv(
const std::string& name,
const std::string& value );
297 static long long currentTimeMillis();
321 static long long nanoTime();
332 static int availableProcessors();
358 static std::string getProperty(
const std::string& key );
375 static std::string getProperty(
const std::string& key,
const std::string& defaultValue );
390 static std::string setProperty(
const std::string& key,
const std::string& value );
403 static std::string clearProperty(
const std::string& key );
414 static std::vector< std::string > getEnvArray();
427 static void initSystem(
int argc,
char **argv );
428 static void shutdownSystem();
#define NULL
Definition: Config.h:33
Wraps an APR pool object so that classes in decaf can create a static member for use in static method...
Definition: AprPool.h:33
virtual ~System()
Definition: System.h:52
static void arraycopy(const E *src, std::size_t srcPos, E *dest, std::size_t destPos, std::size_t length)
Copies the number of elements specified by length from the source array starting at the given source ...
Definition: System.h:222
An object that maps keys to values.
Definition: Map.h:88
Definition: NullPointerException.h:32
#define DECAF_API
Definition: Config.h:29
The System class provides static methods for accessing system level resources and performing some sys...
Definition: System.h:41
Java-like properties class for mapping string names to string values.
Definition: Properties.h:53
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25