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/string>
9#include <xtd/version>
10#include <xtd/collections/generic/key_value_pair>
11#include <xtd/drawing/color>
12#include <xtd/drawing/font>
13#include <xtd/forms/screen>
14#include <xtd/forms/system_information>
15#include "export.h"
16
18namespace xtd {
25 public:
27 enum class reports {
29 stack_trace = 0b1,
31 libraries = 0b10,
33 processor = 0b100,
35 operating_system = 0b1000,
37 compiler = 0b10000,
39 language = 0b100000,
41 locale = 0b1000000,
43 toolkit = 0b10000000,
45 environment_variables = 0b100000000,
47 special_folders = 0b1000000000,
49 system_colors = 0b10000000000,
51 generic_font_families = 0b100000000000,
53 system_fonts = 0b1000000000000,
55 screens = 0b10000000000000,
57 system_informations = 0b100000000000000,
58 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
59 };
60
62
65 using environment_variable_collection = std::vector<xtd::collections::generic::key_value_pair<xtd::string, xtd::string>>;
67 using special_folder_collection = std::vector<xtd::collections::generic::key_value_pair<xtd::string, xtd::string>>;
69 using system_color_collection = std::vector<xtd::collections::generic::key_value_pair<xtd::string, xtd::drawing::color>>;
71 using system_font_collection = std::vector<xtd::collections::generic::key_value_pair<xtd::string, xtd::drawing::font>>;
73 using system_font_family_collection = std::vector<xtd::collections::generic::key_value_pair<xtd::string, xtd::drawing::font_family>>;
75 using system_information_collection = std::vector<xtd::collections::generic::key_value_pair<xtd::string, xtd::string>>;
77
79
83 static xtd::compiler compiler() noexcept;
84
87 static environment_variable_collection environment_variables() noexcept;
88
91 static const system_font_family_collection& generic_font_families() noexcept;
92
95 static xtd::cpp_language language() noexcept;
96
100 static std::locale locale() noexcept;
101
105
108 static xtd::processor processor() noexcept;
109
112 static std::vector<xtd::forms::screen> screens() noexcept;
113
116 static const special_folder_collection& special_folders() noexcept;
117
120 static xtd::diagnostics::stack_trace stack_trace() noexcept;
121
125 static xtd::diagnostics::stack_trace stack_trace(size_t skip_frames) noexcept;
126
129 static const system_color_collection& system_colors() noexcept;
130
133 static const system_font_collection& system_fonts() noexcept;
134
137 static system_information_collection system_informations() noexcept;
138
141 static xtd::toolkit toolkit() noexcept;
142
145 static const environment::xtd_library_collection& xtd_libraries() noexcept;
147
149
154 static xtd::string to_json() noexcept;
159 static xtd::string to_json(reports reports) noexcept;
162 static xtd::string to_string() noexcept;
166 static xtd::string to_string(reports reports) noexcept;
170 static xtd::string to_xml() noexcept;
175 static xtd::string to_xml(reports reports) noexcept;
177 };
178}
179
182
183template<> struct xtd::enum_register<xtd::system_report::reports> {
185};
Represents information about c++ libraries, such as the version and standard identifier....
Definition compiler.h:27
Represents information about c++ libraries, such as the version and language identifier....
Definition cpp_language.h:26
The environment class.
Definition environment.h:66
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:24
std::vector< xtd::collections::generic::key_value_pair< xtd::string, xtd::string > > environment_variable_collection
Represents an environment variables collection.
Definition system_report.h:65
std::vector< xtd::collections::generic::key_value_pair< xtd::string, xtd::string > > special_folder_collection
Represents a folders collection.
Definition system_report.h:67
std::vector< xtd::collections::generic::key_value_pair< xtd::string, xtd::drawing::font_family > > system_font_family_collection
Represents a font families collection.
Definition system_report.h:73
std::vector< xtd::collections::generic::key_value_pair< xtd::string, xtd::drawing::font > > system_font_collection
Represents a fonts collection.
Definition system_report.h:71
std::vector< xtd::collections::generic::key_value_pair< xtd::string, xtd::drawing::color > > system_color_collection
Represents a colors collection.
Definition system_report.h:69
static xtd::compiler compiler() noexcept
Gets an xtd::compiler object that contains the current compiler identifier and version number.
std::vector< xtd::collections::generic::key_value_pair< xtd::string, xtd::string > > system_information_collection
Represents a system informations collection.
Definition system_report.h:75
reports
Specifies enumerated constants used by xtd::system_report::to_json, xtd::system_report::to_string and...
Definition system_report.h:27
@ 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.
Represents a toolkit.
Definition toolkit.h:19
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< xtd::collections::generic::key_value_pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.h:22
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:38