PixelLightAPI
.
|
Abstract base class for platform specific 'System' implementations. More...
#include <SystemImpl.h>
Protected Member Functions | |
SystemImpl () | |
Constructor. | |
virtual | ~SystemImpl () |
Destructor. | |
virtual String | GetPlatform () const =0 |
Returns the name of the platform. | |
virtual String | GetOS () const =0 |
Returns the name and version of the operating system. | |
virtual char | GetSeparator () const =0 |
Returns the directory separator used by the operation system. | |
virtual String | GetSharedLibraryPrefix () const =0 |
Returns the shared library filename prefix used by the operation system. | |
virtual String | GetSharedLibraryExtension () const =0 |
Returns the shared library file extension used by the operation system. | |
virtual uint32 | GetCPUMhz () const =0 |
Get the CPU MHz. | |
virtual String | GetComputerName () const =0 |
Returns the name of the computer. | |
virtual String | GetUserName () const =0 |
Returns the current user name. | |
virtual String | GetUserHomeDir () const =0 |
Get home directory of the current user. | |
virtual String | GetUserDataDir () const =0 |
Get data directory of the current user. | |
virtual String | GetDataDirName (const String &sName) const =0 |
Get name of data directory for given application name. | |
virtual String | GetExecutableFilename () const =0 |
Get absolute path of application executable. | |
virtual String | GetEnvironmentVariable (const String &sName) const =0 |
Reads an environment variable. | |
virtual bool | SetEnvironmentVariable (const String &sName, const String &sValue) const =0 |
Writes an environment variable. | |
virtual void | DeleteEnvironmentVariable (const String &sName) const =0 |
Deletes an environment variable. | |
virtual bool | Execute (const String &sCommand, const String &sParameters, const String &sWorkingDir) const =0 |
Executes a system command (create a new process) | |
virtual String | GetLocaleLanguage () const =0 |
Returns the current program locale language information. | |
virtual String | GetCurrentDir () const =0 |
Returns the current directory. | |
virtual bool | SetCurrentDir (const String &sPath)=0 |
Sets the current directory. | |
virtual Thread * | GetCurrentThread () const =0 |
Returns a pointer to the current thread. | |
virtual void | Exit (int nReturn)=0 |
Exit the application immediately. | |
virtual const Console & | GetConsole () const =0 |
Returns the console instance. | |
virtual void | UrgentMessage (const String &sMessage) const =0 |
Primitive way (e.g. by using a message box) to be able to tell the user that something went terrible wrong. | |
virtual Time | GetTime () const =0 |
Returns the current date and time. | |
virtual uint64 | GetMilliseconds () const =0 |
Returns the number of milliseconds since the system was started. | |
virtual uint64 | GetMicroseconds () const =0 |
Retrieves the number of microseconds since the system was started. | |
virtual void | Sleep (uint64 nMilliseconds) const =0 |
Suspend the current thread for a specified time period. | |
virtual void | Yield () const =0 |
Yields the rest of the current threads time slice. | |
virtual float | GetPercentageOfUsedPhysicalMemory () const =0 |
Returns an approximation of the percentage of used physical memory (0.0-100.0) | |
virtual uint64 | GetTotalPhysicalMemory () const =0 |
Returns the total physical memory in bytes. | |
virtual uint64 | GetFreePhysicalMemory () const =0 |
Returns the current free physical memory in bytes. | |
virtual uint64 | GetTotalVirtualMemory () const =0 |
Returns the total virtual memory in bytes. | |
virtual uint64 | GetFreeVirtualMemory () const =0 |
Returns the current free virtual memory in bytes. |
Abstract base class for platform specific 'System' implementations.
PLCore::SystemImpl::SystemImpl | ( | ) | [protected] |
virtual PLCore::SystemImpl::~SystemImpl | ( | ) | [protected, virtual] |
Destructor.
virtual String PLCore::SystemImpl::GetPlatform | ( | ) | const [protected, pure virtual] |
Returns the name of the platform.
virtual String PLCore::SystemImpl::GetOS | ( | ) | const [protected, pure virtual] |
Returns the name and version of the operating system.
virtual char PLCore::SystemImpl::GetSeparator | ( | ) | const [protected, pure virtual] |
Returns the directory separator used by the operation system.
virtual String PLCore::SystemImpl::GetSharedLibraryPrefix | ( | ) | const [protected, pure virtual] |
Returns the shared library filename prefix used by the operation system.
virtual String PLCore::SystemImpl::GetSharedLibraryExtension | ( | ) | const [protected, pure virtual] |
Returns the shared library file extension used by the operation system.
virtual uint32 PLCore::SystemImpl::GetCPUMhz | ( | ) | const [protected, pure virtual] |
Get the CPU MHz.
virtual String PLCore::SystemImpl::GetComputerName | ( | ) | const [protected, pure virtual] |
Returns the name of the computer.
virtual String PLCore::SystemImpl::GetUserName | ( | ) | const [protected, pure virtual] |
Returns the current user name.
virtual String PLCore::SystemImpl::GetUserHomeDir | ( | ) | const [protected, pure virtual] |
Get home directory of the current user.
virtual String PLCore::SystemImpl::GetUserDataDir | ( | ) | const [protected, pure virtual] |
Get data directory of the current user.
virtual String PLCore::SystemImpl::GetDataDirName | ( | const String & | sName | ) | const [protected, pure virtual] |
Get name of data directory for given application name.
[in] | sName | Application name |
virtual String PLCore::SystemImpl::GetExecutableFilename | ( | ) | const [protected, pure virtual] |
Get absolute path of application executable.
virtual String PLCore::SystemImpl::GetEnvironmentVariable | ( | const String & | sName | ) | const [protected, pure virtual] |
Reads an environment variable.
[in] | sName | Name of the environment variable to read |
virtual bool PLCore::SystemImpl::SetEnvironmentVariable | ( | const String & | sName, |
const String & | sValue | ||
) | const [protected, pure virtual] |
Writes an environment variable.
[in] | sName | Name of the environment variable to write |
[in] | sValue | Value to write into the variable |
virtual void PLCore::SystemImpl::DeleteEnvironmentVariable | ( | const String & | sName | ) | const [protected, pure virtual] |
Deletes an environment variable.
[in] | sName | Name of the environment variable to delete |
virtual bool PLCore::SystemImpl::Execute | ( | const String & | sCommand, |
const String & | sParameters, | ||
const String & | sWorkingDir | ||
) | const [protected, pure virtual] |
Executes a system command (create a new process)
[in] | sCommand | Command to execute |
[in] | sParameters | Parameters to pass to the command |
[in] | sWorkingDir | Working directory in which to execute the command |
virtual String PLCore::SystemImpl::GetLocaleLanguage | ( | ) | const [protected, pure virtual] |
Returns the current program locale language information.
virtual String PLCore::SystemImpl::GetCurrentDir | ( | ) | const [protected, pure virtual] |
Returns the current directory.
virtual bool PLCore::SystemImpl::SetCurrentDir | ( | const String & | sPath | ) | [protected, pure virtual] |
Sets the current directory.
[in] | sPath | Path to the current directory |
virtual Thread* PLCore::SystemImpl::GetCurrentThread | ( | ) | const [protected, pure virtual] |
Returns a pointer to the current thread.
virtual void PLCore::SystemImpl::Exit | ( | int | nReturn | ) | [protected, pure virtual] |
Exit the application immediately.
[in] | nReturn | Return value |
virtual const Console& PLCore::SystemImpl::GetConsole | ( | ) | const [protected, pure virtual] |
Returns the console instance.
virtual void PLCore::SystemImpl::UrgentMessage | ( | const String & | sMessage | ) | const [protected, pure virtual] |
Primitive way (e.g. by using a message box) to be able to tell the user that something went terrible wrong.
[in] | sMessage | Message to show |
virtual Time PLCore::SystemImpl::GetTime | ( | ) | const [protected, pure virtual] |
Returns the current date and time.
virtual uint64 PLCore::SystemImpl::GetMilliseconds | ( | ) | const [protected, pure virtual] |
Returns the number of milliseconds since the system was started.
virtual uint64 PLCore::SystemImpl::GetMicroseconds | ( | ) | const [protected, pure virtual] |
Retrieves the number of microseconds since the system was started.
virtual void PLCore::SystemImpl::Sleep | ( | uint64 | nMilliseconds | ) | const [protected, pure virtual] |
Suspend the current thread for a specified time period.
[in] | nMilliseconds | Number of milliseconds to sleep |
virtual void PLCore::SystemImpl::Yield | ( | ) | const [protected, pure virtual] |
Yields the rest of the current threads time slice.
virtual float PLCore::SystemImpl::GetPercentageOfUsedPhysicalMemory | ( | ) | const [protected, pure virtual] |
Returns an approximation of the percentage of used physical memory (0.0-100.0)
virtual uint64 PLCore::SystemImpl::GetTotalPhysicalMemory | ( | ) | const [protected, pure virtual] |
Returns the total physical memory in bytes.
virtual uint64 PLCore::SystemImpl::GetFreePhysicalMemory | ( | ) | const [protected, pure virtual] |
Returns the current free physical memory in bytes.
virtual uint64 PLCore::SystemImpl::GetTotalVirtualMemory | ( | ) | const [protected, pure virtual] |
Returns the total virtual memory in bytes.
virtual uint64 PLCore::SystemImpl::GetFreeVirtualMemory | ( | ) | const [protected, pure virtual] |
Returns the current free virtual memory in bytes.
|