software-modes.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #pragma once
  2. #ifdef CHECK_SOFTWARE_MODES
  3. #define MODE inSoftwareMode
  4. #define MODE_ inSoftwareMode,
  5. #else
  6. #define MODE
  7. #define MODE_
  8. #endif
  9. #ifdef CHECK_SOFTWARE_MODES
  10. class BOOT_mode_class {
  11. private: BOOT_mode_class (void) = delete ;
  12. private: BOOT_mode_class & operator = (const BOOT_mode_class &) = delete ;
  13. public: BOOT_mode_class (const BOOT_mode_class &) ;
  14. } ;
  15. #endif
  16. #ifdef CHECK_SOFTWARE_MODES
  17. #define BOOT_MODE const BOOT_mode_class MODE
  18. #define BOOT_MODE_ const BOOT_mode_class MODE,
  19. #else
  20. #define BOOT_MODE void
  21. #define BOOT_MODE_
  22. #endif
  23. #ifdef CHECK_SOFTWARE_MODES
  24. class INIT_mode_class {
  25. private: INIT_mode_class (void) = delete ;
  26. private: INIT_mode_class & operator = (const INIT_mode_class &) = delete ;
  27. public: INIT_mode_class (const INIT_mode_class &) ;
  28. };
  29. #endif
  30. #ifdef CHECK_SOFTWARE_MODES
  31. #define INIT_MODE const INIT_mode_class MODE
  32. #define INIT_MODE_ const INIT_mode_class MODE,
  33. #else
  34. #define INIT_MODE void
  35. #define INIT_MODE_
  36. #endif
  37. #ifdef CHECK_SOFTWARE_MODES
  38. class USER_mode_class {
  39. private: USER_mode_class (void) = delete ;
  40. private: USER_mode_class & operator = (const USER_mode_class &) = delete ;
  41. public: USER_mode_class (const USER_mode_class &) ;
  42. } ;
  43. #endif
  44. #ifdef CHECK_SOFTWARE_MODES
  45. #define USER_MODE const USER_mode_class MODE
  46. #define USER_MODE_ const USER_mode_class MODE,
  47. #else
  48. #define USER_MODE void
  49. #define USER_MODE_
  50. #endif
  51. #ifdef CHECK_SOFTWARE_MODES
  52. class KERNEL_mode_class {
  53. private: KERNEL_mode_class (void) = delete ;
  54. private: KERNEL_mode_class & operator = (const KERNEL_mode_class &) = delete ;
  55. public: KERNEL_mode_class (const KERNEL_mode_class &) ;
  56. } ;
  57. #endif
  58. #ifdef CHECK_SOFTWARE_MODES
  59. #define KERNEL_MODE const KERNEL_mode_class MODE
  60. #define KERNEL_MODE_ const KERNEL_mode_class MODE,
  61. #else
  62. #define KERNEL_MODE void
  63. #define KERNEL_MODE_
  64. #endif
  65. #ifdef CHECK_SOFTWARE_MODES
  66. class IRQ_mode_class {
  67. private: IRQ_mode_class (void) = delete ;
  68. private: IRQ_mode_class & operator = (const IRQ_mode_class &) = delete ;
  69. public: IRQ_mode_class (const IRQ_mode_class &) ;
  70. public: IRQ_mode_class (const KERNEL_mode_class &) ;
  71. public: IRQ_mode_class (const INIT_mode_class &) ;
  72. } ;
  73. #endif
  74. #ifdef CHECK_SOFTWARE_MODES
  75. #define IRQ_MODE const IRQ_mode_class MODE
  76. #define IRQ_MODE_ const IRQ_mode_class MODE,
  77. #else
  78. #define IRQ_MODE void
  79. #define IRQ_MODE_
  80. #endif
  81. #ifdef CHECK_SOFTWARE_MODES
  82. class SECTION_mode_class {
  83. private: SECTION_mode_class (void) = delete ;
  84. private: SECTION_mode_class & operator = (const SECTION_mode_class &) = delete ;
  85. public: SECTION_mode_class (const SECTION_mode_class &) ;
  86. public: SECTION_mode_class (const IRQ_mode_class &) ;
  87. public: SECTION_mode_class (const KERNEL_mode_class &) ;
  88. public: SECTION_mode_class (const INIT_mode_class &) ;
  89. } ;
  90. #endif
  91. #ifdef CHECK_SOFTWARE_MODES
  92. #define SECTION_MODE const SECTION_mode_class MODE
  93. #define SECTION_MODE_ const SECTION_mode_class MODE,
  94. #else
  95. #define SECTION_MODE void
  96. #define SECTION_MODE_
  97. #endif
  98. #ifdef CHECK_SOFTWARE_MODES
  99. class FAULT_mode_class {
  100. private: FAULT_mode_class (void) = delete ;
  101. private: FAULT_mode_class & operator = (const FAULT_mode_class &) = delete ;
  102. public: FAULT_mode_class (const FAULT_mode_class &) ;
  103. } ;
  104. #endif
  105. #ifdef CHECK_SOFTWARE_MODES
  106. #define FAULT_MODE const FAULT_mode_class MODE
  107. #define FAULT_MODE_ const FAULT_mode_class MODE,
  108. #else
  109. #define FAULT_MODE void
  110. #define FAULT_MODE_
  111. #endif
  112. #ifdef CHECK_SOFTWARE_MODES
  113. class ANY_mode_class {
  114. private: ANY_mode_class (void) = delete ;
  115. private: ANY_mode_class & operator = (const ANY_mode_class &) = delete ;
  116. public: ANY_mode_class (const ANY_mode_class &) ;
  117. public: ANY_mode_class (const SECTION_mode_class &) ;
  118. public: ANY_mode_class (const IRQ_mode_class &) ;
  119. public: ANY_mode_class (const KERNEL_mode_class &) ;
  120. public: ANY_mode_class (const INIT_mode_class &) ;
  121. public: ANY_mode_class (const USER_mode_class &) ;
  122. } ;
  123. #endif
  124. #ifdef CHECK_SOFTWARE_MODES
  125. #define ANY_MODE const ANY_mode_class MODE
  126. #define ANY_MODE_ const ANY_mode_class MODE,
  127. #else
  128. #define ANY_MODE void
  129. #define ANY_MODE_
  130. #endif