xtd 0.2.0
Loading...
Searching...
No Matches
system_report.h
Go to the documentation of this file.
1
4#pragma once
5#include <vector>
6#include <xtd/environment>
7#include <xtd/static>
8#include <xtd/ustring>
9#include <xtd/version>
10#include <xtd/drawing/color>
11#include <xtd/drawing/font>
12#include <xtd/forms/screen>
13#include <xtd/forms/system_information>
14#include "export.h"
15
17namespace xtd {
24 public:
26 enum class reports {
28 stack_trace = 0b1,
30 libraries = 0b10,
32 processor = 0b100,
34 operating_system = 0b1000,
36 compiler = 0b10000,
38 language = 0b100000,
40 locale = 0b1000000,
42 toolkit = 0b10000000,
44 environment_variables = 0b100000000,
46 special_folders = 0b1000000000,
48 system_colors = 0b10000000000,
50 generic_font_families = 0b100000000000,
52 system_fonts = 0b1000000000000,
54 screens = 0b10000000000000,
56 system_informations = 0b100000000000000,
57 all = stack_trace|libraries|processor|operating_system|compiler|language|locale|toolkit|environment_variables|special_folders|system_colors|generic_font_families|system_fonts|screens|system_informations
58 };
59
61
64 using environment_variable_collection = std::vector<std::pair<xtd::ustring, xtd::ustring>>;
66 using special_folder_collection = std::vector<std::pair<xtd::ustring, xtd::ustring>>;
68 using system_color_collection = std::vector<std::pair<xtd::ustring, xtd::drawing::color>>;
70 using system_font_collection = std::vector<std::pair<xtd::ustring, xtd::drawing::font>>;
72 using system_font_family_collection = std::vector<std::pair<xtd::ustring, xtd::drawing::font_family>>;
74 using system_information_collection = std::vector<std::pair<xtd::ustring, xtd::ustring>>;
76
78
82 static xtd::compiler compiler() noexcept;
83
86 static environment_variable_collection environment_variables() noexcept;
87
90 static const system_font_family_collection& generic_font_families() noexcept;
91
94 static xtd::cpp_language language() noexcept;
95
99 static std::locale locale() noexcept;
100
104
107 static xtd::processor processor() noexcept;
108
111 static std::vector<xtd::forms::screen> screens() noexcept;
112
115 static const special_folder_collection& special_folders() noexcept;
116
119 static xtd::diagnostics::stack_trace stack_trace() noexcept;
120
124 static xtd::diagnostics::stack_trace stack_trace(size_t skip_frames) noexcept;
125
128 static const system_color_collection& system_colors() noexcept;
129
132 static const system_font_collection& system_fonts() noexcept;
133
136 static system_information_collection system_informations() noexcept;
137
140 static xtd::toolkit toolkit() noexcept;
141
144 static const environment::xtd_library_collection& xtd_libraries() noexcept;
146
148
153 static xtd::ustring to_json() noexcept;
158 static xtd::ustring to_json(reports reports) noexcept;
161 static xtd::ustring to_string() noexcept;
165 static xtd::ustring to_string(reports reports) noexcept;
169 static xtd::ustring to_xml() noexcept;
174 static xtd::ustring to_xml(reports reports) noexcept;
176 };
177}
178
181
182template<> struct xtd::enum_register<xtd::system_report::reports> {
184};
Represents information about c++ libraries, such as the version and standard identifier....
Definition compiler.h:25
Represents information about c++ libraries, such as the version and language identifier....
Definition cpp_language.h:24
The environment class.
Definition environment.h:117
Represents information about an operating system, such as the version and platform identifier....
Definition operating_system.h:25
Represents information about a processor, such as the architecture. This class cannot be inherited.
Definition processor.h:19
Provides system report about the current system environment.
Definition system_report.h:23
std::vector< std::pair< xtd::ustring, xtd::ustring > > special_folder_collection
Represents a folders collection.
Definition system_report.h:66
std::vector< std::pair< xtd::ustring, xtd::drawing::color > > system_color_collection
Represents a colors collection.
Definition system_report.h:68
std::vector< std::pair< xtd::ustring, xtd::drawing::font_family > > system_font_family_collection
Represents a font families collection.
Definition system_report.h:72
std::vector< std::pair< xtd::ustring, xtd::ustring > > system_information_collection
Represents a system informations collection.
Definition system_report.h:74
static xtd::compiler compiler() noexcept
Gets an xtd::compiler object that contains the current compiler identifier and version number.
std::vector< std::pair< xtd::ustring, xtd::ustring > > environment_variable_collection
Represents an environment variables collection.
Definition system_report.h:64
reports
Specifies enumerated constants used by xtd::system_report::to_json, xtd::system_report::to_string and...
Definition system_report.h:26
@ environment_variables
Environment variable names and their values.
@ stack_trace
Stack trace information.
@ libraries
xtd libraries informations collection.
@ processor
The procesor identifier.
@ system_informations
System informations collection.
@ generic_font_families
Generic font families collection.
@ language
The c++ standard identifier and version number.
@ compiler
The compiler identifier and version number.
@ special_folders
Directory paths to system special folders.
@ system_fonts
System fonsts collection.
@ system_colors
System colors collection.
@ screens
Displays on the system.
@ operating_system
The platform identifier and version number.
@ toolkit
The toolkit identifier and version number.
@ locale
The global C++ locale.
std::vector< std::pair< xtd::ustring, xtd::drawing::font > > system_font_collection
Represents a fonts collection.
Definition system_report.h:70
Represents a toolkit.
Definition toolkit.h:19
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Contains export_ keyword.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.h:37
#define export_
Define shared library export.
Definition export.h:13
#define flags_attribute_(namespace_name, enum_type)
Provides the set attribute struct for enumerations helper.
Definition flags_attribute.h:34
std::vector< std::pair< enum_t, xtd::ustring > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.h:19
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Provides the registration struct for enumerations.
Definition enum_register.h:36