xtd 0.2.0
Loading...
Searching...
No Matches
target_id.h
Go to the documentation of this file.
1
4#pragma once
5#include "enum.h"
6
8// The following constants are defined in the file xtd_command.cmake.
9// If the target project is not built with cmake, each constant will be defined as follows:
10// | Constant | Value | Description |
11// | ------------------------------------- | ----- | ---------------------------------- |
12// | __XTD_TARGET_ID_UNKNOWN__ | 0 | The target is unknown. |
13// | __XTD_TARGET_ID_CONSOLE_APPLICATION__ | 1 | The target is console application. |
14// | __XTD_TARGET_ID_GUI_APPLICATION__ | 2 | The target is gui application. |
15// | __XTD_TARGET_ID_TEST_APPLICATION__ | 3 | The target is test application. |
16// | __XTD_TARGET_ID_INTERFACE_LIBRARY__ | 4 | The target is interface library. |
17// | __XTD_TARGET_ID_MODULE_LIBRARY__ | 5 | The target is module library. |
18// | __XTD_TARGET_ID_SHARED_LIBRARY__ | 6 | The target is shared library. |
19// | __XTD_TARGET_ID_STATIC_LIBRARY__ | 7 | The target is static library. |
20// | __XTD_TARGET_ID_CUSTOM_TARGET__ | 8 | The target is custom target. |
21//
22// Remarks
23// if __XTD_CURRENT_TARGET_ID__ id not defined. It will be defined as __XTD_TARGET_ID_UNKNOWN__.
24
25#define __XTD_TARGET_ID_UNKNOWN__ 0
26#define __XTD_TARGET_ID_CONSOLE_APPLICATION__ 1
27#define __XTD_TARGET_ID_GUI_APPLICATION__ 2
28#define __XTD_TARGET_ID_TEST_APPLICATION__ 3
29#define __XTD_TARGET_ID_INTERFACE_LIBRARY__ 4
30#define __XTD_TARGET_ID_MODULE_LIBRARY__ 5
31#define __XTD_TARGET_ID_SHARED_LIBRARY__ 6
32#define __XTD_TARGET_ID_STATIC_LIBRARY__ 7
33#define __XTD_TARGET_ID_CUSTOM_TARGET__ 8
34
35#if !defined(__XTD_CURRENT_TARGET_ID__)
36#define __XTD_CURRENT_TARGET_ID__ __XTD_TARGET_ID_UNKNOWN__
37#endif
39
41namespace xtd {
49 enum class target_id {
51 unknown = __XTD_TARGET_ID_UNKNOWN__,
53 console_application = __XTD_TARGET_ID_CONSOLE_APPLICATION__,
55 gui_application = __XTD_TARGET_ID_GUI_APPLICATION__,
57 test_application = __XTD_TARGET_ID_TEST_APPLICATION__,
59 interface_library = __XTD_TARGET_ID_INTERFACE_LIBRARY__,
61 module_library = __XTD_TARGET_ID_MODULE_LIBRARY__,
63 shared_library = __XTD_TARGET_ID_SHARED_LIBRARY__,
65 static_library = __XTD_TARGET_ID_STATIC_LIBRARY__,
67 custom_target = __XTD_TARGET_ID_CUSTOM_TARGET__,
68 };
69}
70
72template<> struct xtd::enum_register<xtd::target_id> {
73 explicit operator auto() const noexcept {return xtd::enum_collection<xtd::target_id> {{xtd::target_id::unknown, "unknown"}, {xtd::target_id::console_application, "console_application"}, {xtd::target_id::gui_application, "gui_application"}, {xtd::target_id::test_application, "test_application"}, {xtd::target_id::interface_library, "interface_library"}, {xtd::target_id::module_library, "module_library"}, {xtd::target_id::shared_library, "shared_library"}, {xtd::target_id::static_library, "static_library"}, {xtd::target_id::custom_target, "custom_target"}};}
74};
Contains enum_ and enum_ut_ keywords.
target_id
Identifies the target, supported by an assembly.
Definition target_id.h:49
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
@ static_library
The target is static library.
@ custom_target
The target is custom target.
@ test_application
The target is test application.
@ module_library
The target is module library.
@ shared_library
The target is shared library.
@ gui_application
The target is gui application.
@ unknown
The target is unknown.
@ interface_library
The target is interface library.
@ console_application
The target is console application.
@ unknown
The processor architecture is unknown.
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