CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
operating_system.h
1
3#ifndef _operating_system_h_
4#define _operating_system_h_
5#include "system/version.h"
6#include "system/platform_id.h"
7
8namespace System {
9
14class ASPOSECPP_SHARED_CLASS OperatingSystem
15{
16public:
20 ASPOSECPP_SHARED_API OperatingSystem(PlatformID platform, const Version& version);
25 ASPOSECPP_SHARED_API OperatingSystem(PlatformID platform, const Version& version, const String& service_pack);
26
28 ASPOSECPP_SHARED_API PlatformID get_Platform() const;
30 ASPOSECPP_SHARED_API String get_ServicePack() const;
32 ASPOSECPP_SHARED_API const Version& get_Version() const;
34 ASPOSECPP_SHARED_API String get_VersionString() const;
36 ASPOSECPP_SHARED_API String ToString() const;
37
38private:
40 Version m_version;
42 PlatformID m_platform;
44 String m_service_pack;
46 mutable String m_version_string;
47};
48
53inline std::ostream& operator<<(std::ostream& stream, const OperatingSystem& os)
54{
55 stream << os.ToString();
56 return stream;
57}
58
63inline std::wostream& operator<<(std::wostream& stream, const OperatingSystem& os)
64{
65 stream << os.ToString();
66 return stream;
67}
68
69} // namespace System
70#endif // _operating_system_h_
Represents a particular operating system and provides information about it. Objects of this class sho...
Definition: operating_system.h:15
String get_VersionString() const
Returns the string representation of the version of the operating system represented by the current o...
OperatingSystem(PlatformID platform, const Version &version, const String &service_pack)
Constructs an instance that represents an operating system specified as particular platform id,...
OperatingSystem(PlatformID platform, const Version &version)
Constructs an instance that represents an operating system specified as particular platform id and ve...
PlatformID get_Platform() const
Returns the platform identifier of the operating system represented by the current object.
String ToString() const
Returns the string representation of the version of the operating system represented by the current o...
String get_ServicePack() const
Returns the service pack name of the operating system represented by the current object.
const Version & get_Version() const
Returns a constant reference to a Version object representing the version of the operating system rep...
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a version number. This type should be allocated on stack and passed to functions by value ...
Definition: version.h:15
Definition: db_command.h:9
PlatformID
Represents an operating system platform.
Definition: platform_id.h:11
std::ostream & operator<<(std::ostream &stream, DateTime date_time)
Insert data into the stream using UTF-8 encoding.
Definition: date_time.h:729