Signal.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. //
  2. // "$Id: Signal.h 55347 2012-03-22 11:26:45Z qin_fenglin $"
  3. //
  4. // Copyright (c)1992-2007, ZheJiang Dahua Technology Stock CO.LTD.
  5. // All Rights Reserved.
  6. //
  7. // Description:
  8. // Revisions: Year-Month-Day SVN-Author Modification
  9. //
  10. #ifndef __INFRA3_SIGNALS_H__
  11. #define __INFRA3_SIGNALS_H__
  12. #if defined(_MSC_VER)
  13. #pragma warning (push)
  14. #pragma warning (disable : 4786)
  15. #endif
  16. #include <stdio.h>
  17. #include "Function.h"
  18. #include "Mutex.h"
  19. #include "Guard.h"
  20. #include "Thread.h"
  21. #include "Time.h"
  22. #include "PrintLog.h"
  23. namespace Dahua{
  24. namespace Infra{
  25. //TSignal0
  26. #define SIGNAL_NUMBER 0
  27. #define SIGNAL_CLASS_TYPES void
  28. #define SIGNAL_TYPES_COMMA
  29. #define SIGNAL_TYPE_ARGS void
  30. #define SIGNAL_ARGS
  31. #include "SignalTemplate.h"
  32. #undef SIGNAL_NUMBER
  33. #undef SIGNAL_CLASS_TYPES
  34. #undef SIGNAL_TYPES_COMMA
  35. #undef SIGNAL_TYPE_ARGS
  36. #undef SIGNAL_ARGS
  37. //TSignal1
  38. #define SIGNAL_NUMBER 1
  39. #define SIGNAL_CLASS_TYPES typename T1
  40. #define SIGNAL_TYPES_COMMA , T1
  41. #define SIGNAL_TYPE_ARGS T1 a1
  42. #define SIGNAL_ARGS a1
  43. #include "SignalTemplate.h"
  44. #undef SIGNAL_NUMBER
  45. #undef SIGNAL_CLASS_TYPES
  46. #undef SIGNAL_TYPES_COMMA
  47. #undef SIGNAL_TYPE_ARGS
  48. #undef SIGNAL_ARGS
  49. //TSignal2
  50. #define SIGNAL_NUMBER 2
  51. #define SIGNAL_CLASS_TYPES typename T1, typename T2
  52. #define SIGNAL_TYPES_COMMA , T1, T2
  53. #define SIGNAL_TYPE_ARGS T1 a1, T2 a2
  54. #define SIGNAL_ARGS a1, a2
  55. #include "SignalTemplate.h"
  56. #undef SIGNAL_NUMBER
  57. #undef SIGNAL_CLASS_TYPES
  58. #undef SIGNAL_TYPES_COMMA
  59. #undef SIGNAL_TYPE_ARGS
  60. #undef SIGNAL_ARGS
  61. //TSignal3
  62. #define SIGNAL_NUMBER 3
  63. #define SIGNAL_CLASS_TYPES typename T1, typename T2, typename T3
  64. #define SIGNAL_TYPES_COMMA , T1, T2, T3
  65. #define SIGNAL_TYPE_ARGS T1 a1, T2 a2, T3 a3
  66. #define SIGNAL_ARGS a1, a2, a3
  67. #include "SignalTemplate.h"
  68. #undef SIGNAL_NUMBER
  69. #undef SIGNAL_CLASS_TYPES
  70. #undef SIGNAL_TYPES_COMMA
  71. #undef SIGNAL_TYPE_ARGS
  72. #undef SIGNAL_ARGS
  73. //TSignal4
  74. #define SIGNAL_NUMBER 4
  75. #define SIGNAL_CLASS_TYPES typename T1, typename T2, typename T3, typename T4
  76. #define SIGNAL_TYPES_COMMA , T1, T2, T3, T4
  77. #define SIGNAL_TYPE_ARGS T1 a1, T2 a2, T3 a3, T4 a4
  78. #define SIGNAL_ARGS a1, a2, a3, a4
  79. #include "SignalTemplate.h"
  80. #undef SIGNAL_NUMBER
  81. #undef SIGNAL_CLASS_TYPES
  82. #undef SIGNAL_TYPES_COMMA
  83. #undef SIGNAL_TYPE_ARGS
  84. #undef SIGNAL_ARGS
  85. //TSignal5
  86. #define SIGNAL_NUMBER 5
  87. #define SIGNAL_CLASS_TYPES typename T1, typename T2, typename T3, typename T4, typename T5
  88. #define SIGNAL_TYPES_COMMA , T1, T2, T3, T4, T5
  89. #define SIGNAL_TYPE_ARGS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
  90. #define SIGNAL_ARGS a1, a2, a3, a4, a5
  91. #include "SignalTemplate.h"
  92. #undef SIGNAL_NUMBER
  93. #undef SIGNAL_CLASS_TYPES
  94. #undef SIGNAL_TYPES_COMMA
  95. #undef SIGNAL_TYPE_ARGS
  96. #undef SIGNAL_ARGS
  97. //TSignal6
  98. #define SIGNAL_NUMBER 6
  99. #define SIGNAL_CLASS_TYPES typename T1, typename T2, typename T3, typename T4, typename T5, typename T6
  100. #define SIGNAL_TYPES_COMMA , T1, T2, T3, T4, T5, T6
  101. #define SIGNAL_TYPE_ARGS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6
  102. #define SIGNAL_ARGS a1, a2, a3, a4, a5, a6
  103. #include "SignalTemplate.h"
  104. #undef SIGNAL_NUMBER
  105. #undef SIGNAL_CLASS_TYPES
  106. #undef SIGNAL_TYPES_COMMA
  107. #undef SIGNAL_TYPE_ARGS
  108. #undef SIGNAL_ARGS
  109. } // namespace Infra
  110. } // namespace Dahua
  111. #if defined(_MSC_VER)
  112. #pragma warning (pop)
  113. #endif
  114. #endif //__INFRA_SIGNALS_H__