The System class provides methods for geting system informations. Unix users will
recognize informations looking like what the uname command returns. Of course, on Unix
systems this class is implemented using the uname system call.
On Windows platforms this class tries to provide the same information, or at least the
same outputs, but using different system calls, since there is no uname API provided by
Microsoft.
Synopsis
#include <lyric/System.hpp>
class System
{
public:
~System ();
System ();
System (const System& system);
System& operator = (const System& system);
const String& name () const;
const String& release () const;
const String& version () const;
const String& machine () const;
};
Description
-
˜System () -
Destroy this system information, releasing eventually reserved memory. All
stored items are destroyed.
-
System () -
Construct this system information, grabing the system informations using
available system calls.
-
System (const System& system) -
Construct this system information from the given system. The current
implementation actually grabs the system informations again, but on the same
system both system and this should contain the same information at the end.
-
System& operator = (const System& system) -
Assign the given system information to this, and returns a reference to this for
assignment chaining. The current implementation actually grabs the system
informations again, but on the same system both system and this should
contain the same information at the end.
-
const String& name () const -
Return the stored system name. Table 5.1 illustrates the returned values.
|
| Operating System | Return |
|
| Linux | Linux |
Solaris | Solaris |
Windows 95/98/ME | Windows 9x |
Windows NT/2000 | Windows NT |
|
| |
Table 5.1: | Values returned by System::name(). |
|
-
const String& release () const -
Return the release number string of this system. Release numbers are given in
major.minor.micro format. The returned string can be assigned as is to an object of
class Version (see Section 6.7).
-
const String& version () const -
Return the version string of this system.
function[const]const String&machine Return the machine identification string of
this system.