Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

312 lines
11 KiB

  1. //========= Copyright � 1996-2010, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. class CFuncInstanceIoProxy : public CBaseEntity
  11. {
  12. public:
  13. DECLARE_CLASS( CFuncInstanceIoProxy, CBaseEntity );
  14. // Input handlers
  15. void InputProxyRelay1( inputdata_t &inputdata );
  16. void InputProxyRelay2( inputdata_t &inputdata );
  17. void InputProxyRelay3( inputdata_t &inputdata );
  18. void InputProxyRelay4( inputdata_t &inputdata );
  19. void InputProxyRelay5( inputdata_t &inputdata );
  20. void InputProxyRelay6( inputdata_t &inputdata );
  21. void InputProxyRelay7( inputdata_t &inputdata );
  22. void InputProxyRelay8( inputdata_t &inputdata );
  23. void InputProxyRelay9( inputdata_t &inputdata );
  24. void InputProxyRelay10( inputdata_t &inputdata );
  25. void InputProxyRelay11( inputdata_t &inputdata );
  26. void InputProxyRelay12( inputdata_t &inputdata );
  27. void InputProxyRelay13( inputdata_t &inputdata );
  28. void InputProxyRelay14( inputdata_t &inputdata );
  29. void InputProxyRelay15( inputdata_t &inputdata );
  30. void InputProxyRelay16( inputdata_t &inputdata );
  31. void InputProxyRelay17( inputdata_t &inputdata );
  32. void InputProxyRelay18( inputdata_t &inputdata );
  33. void InputProxyRelay19( inputdata_t &inputdata );
  34. void InputProxyRelay20( inputdata_t &inputdata );
  35. void InputProxyRelay21( inputdata_t &inputdata );
  36. void InputProxyRelay22( inputdata_t &inputdata );
  37. void InputProxyRelay23( inputdata_t &inputdata );
  38. void InputProxyRelay24( inputdata_t &inputdata );
  39. void InputProxyRelay25( inputdata_t &inputdata );
  40. void InputProxyRelay26( inputdata_t &inputdata );
  41. void InputProxyRelay27( inputdata_t &inputdata );
  42. void InputProxyRelay28( inputdata_t &inputdata );
  43. void InputProxyRelay29( inputdata_t &inputdata );
  44. void InputProxyRelay30( inputdata_t &inputdata );
  45. ;
  46. DECLARE_DATADESC();
  47. private:
  48. COutputEvent m_OnProxyRelay1;
  49. COutputEvent m_OnProxyRelay2;
  50. COutputEvent m_OnProxyRelay3;
  51. COutputEvent m_OnProxyRelay4;
  52. COutputEvent m_OnProxyRelay5;
  53. COutputEvent m_OnProxyRelay6;
  54. COutputEvent m_OnProxyRelay7;
  55. COutputEvent m_OnProxyRelay8;
  56. COutputEvent m_OnProxyRelay9;
  57. COutputEvent m_OnProxyRelay10;
  58. COutputEvent m_OnProxyRelay11;
  59. COutputEvent m_OnProxyRelay12;
  60. COutputEvent m_OnProxyRelay13;
  61. COutputEvent m_OnProxyRelay14;
  62. COutputEvent m_OnProxyRelay15;
  63. COutputEvent m_OnProxyRelay16;
  64. COutputEvent m_OnProxyRelay17;
  65. COutputEvent m_OnProxyRelay18;
  66. COutputEvent m_OnProxyRelay19;
  67. COutputEvent m_OnProxyRelay20;
  68. COutputEvent m_OnProxyRelay21;
  69. COutputEvent m_OnProxyRelay22;
  70. COutputEvent m_OnProxyRelay23;
  71. COutputEvent m_OnProxyRelay24;
  72. COutputEvent m_OnProxyRelay25;
  73. COutputEvent m_OnProxyRelay26;
  74. COutputEvent m_OnProxyRelay27;
  75. COutputEvent m_OnProxyRelay28;
  76. COutputEvent m_OnProxyRelay29;
  77. COutputEvent m_OnProxyRelay30;
  78. };
  79. LINK_ENTITY_TO_CLASS( func_instance_io_proxy, CFuncInstanceIoProxy );
  80. BEGIN_DATADESC( CFuncInstanceIoProxy )
  81. // Inputs
  82. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay1", InputProxyRelay1 ),
  83. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay2", InputProxyRelay2 ),
  84. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay3", InputProxyRelay3 ),
  85. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay4", InputProxyRelay4 ),
  86. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay5", InputProxyRelay5 ),
  87. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay6", InputProxyRelay6 ),
  88. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay7", InputProxyRelay7 ),
  89. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay8", InputProxyRelay8 ),
  90. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay9", InputProxyRelay9 ),
  91. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay10", InputProxyRelay10 ),
  92. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay11", InputProxyRelay11 ),
  93. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay12", InputProxyRelay12 ),
  94. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay13", InputProxyRelay13 ),
  95. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay14", InputProxyRelay14 ),
  96. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay15", InputProxyRelay15 ),
  97. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay16", InputProxyRelay16 ),
  98. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay17", InputProxyRelay17 ),
  99. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay18", InputProxyRelay18 ),
  100. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay19", InputProxyRelay19 ),
  101. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay20", InputProxyRelay20 ),
  102. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay21", InputProxyRelay21 ),
  103. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay22", InputProxyRelay22 ),
  104. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay23", InputProxyRelay23 ),
  105. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay24", InputProxyRelay24 ),
  106. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay25", InputProxyRelay25 ),
  107. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay26", InputProxyRelay26 ),
  108. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay27", InputProxyRelay27 ),
  109. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay28", InputProxyRelay28 ),
  110. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay29", InputProxyRelay29 ),
  111. DEFINE_INPUTFUNC( FIELD_STRING, "OnProxyRelay30", InputProxyRelay30 ),
  112. // Outputs
  113. DEFINE_OUTPUT( m_OnProxyRelay1, "OnProxyRelay1" ),
  114. DEFINE_OUTPUT( m_OnProxyRelay2, "OnProxyRelay2" ),
  115. DEFINE_OUTPUT( m_OnProxyRelay3, "OnProxyRelay3" ),
  116. DEFINE_OUTPUT( m_OnProxyRelay4, "OnProxyRelay4" ),
  117. DEFINE_OUTPUT( m_OnProxyRelay5, "OnProxyRelay5" ),
  118. DEFINE_OUTPUT( m_OnProxyRelay6, "OnProxyRelay6" ),
  119. DEFINE_OUTPUT( m_OnProxyRelay7, "OnProxyRelay7" ),
  120. DEFINE_OUTPUT( m_OnProxyRelay8, "OnProxyRelay8" ),
  121. DEFINE_OUTPUT( m_OnProxyRelay9, "OnProxyRelay9" ),
  122. DEFINE_OUTPUT( m_OnProxyRelay10, "OnProxyRelay10" ),
  123. DEFINE_OUTPUT( m_OnProxyRelay11, "OnProxyRelay11" ),
  124. DEFINE_OUTPUT( m_OnProxyRelay12, "OnProxyRelay12" ),
  125. DEFINE_OUTPUT( m_OnProxyRelay13, "OnProxyRelay13" ),
  126. DEFINE_OUTPUT( m_OnProxyRelay14, "OnProxyRelay14" ),
  127. DEFINE_OUTPUT( m_OnProxyRelay15, "OnProxyRelay15" ),
  128. DEFINE_OUTPUT( m_OnProxyRelay16, "OnProxyRelay16" ),
  129. DEFINE_OUTPUT( m_OnProxyRelay16, "OnProxyRelay16" ),
  130. DEFINE_OUTPUT( m_OnProxyRelay17, "OnProxyRelay17" ),
  131. DEFINE_OUTPUT( m_OnProxyRelay18, "OnProxyRelay18" ),
  132. DEFINE_OUTPUT( m_OnProxyRelay19, "OnProxyRelay19" ),
  133. DEFINE_OUTPUT( m_OnProxyRelay20, "OnProxyRelay20" ),
  134. DEFINE_OUTPUT( m_OnProxyRelay21, "OnProxyRelay21" ),
  135. DEFINE_OUTPUT( m_OnProxyRelay22, "OnProxyRelay22" ),
  136. DEFINE_OUTPUT( m_OnProxyRelay23, "OnProxyRelay23" ),
  137. DEFINE_OUTPUT( m_OnProxyRelay24, "OnProxyRelay24" ),
  138. DEFINE_OUTPUT( m_OnProxyRelay25, "OnProxyRelay25" ),
  139. DEFINE_OUTPUT( m_OnProxyRelay26, "OnProxyRelay26" ),
  140. DEFINE_OUTPUT( m_OnProxyRelay27, "OnProxyRelay27" ),
  141. DEFINE_OUTPUT( m_OnProxyRelay28, "OnProxyRelay28" ),
  142. DEFINE_OUTPUT( m_OnProxyRelay29, "OnProxyRelay29" ),
  143. DEFINE_OUTPUT( m_OnProxyRelay30, "OnProxyRelay30" ),
  144. END_DATADESC()
  145. //------------------------------------------------------------------------------
  146. // Purpose : Route the incomming to the outgoing proxy messages.
  147. //------------------------------------------------------------------------------
  148. void CFuncInstanceIoProxy::InputProxyRelay1( inputdata_t &inputdata )
  149. {
  150. m_OnProxyRelay1.FireOutput( inputdata.pActivator, inputdata.pCaller );
  151. }
  152. void CFuncInstanceIoProxy::InputProxyRelay2( inputdata_t &inputdata )
  153. {
  154. m_OnProxyRelay2.FireOutput( inputdata.pActivator, inputdata.pCaller );
  155. }
  156. void CFuncInstanceIoProxy::InputProxyRelay3( inputdata_t &inputdata )
  157. {
  158. m_OnProxyRelay3.FireOutput( inputdata.pActivator, inputdata.pCaller );
  159. }
  160. void CFuncInstanceIoProxy::InputProxyRelay4( inputdata_t &inputdata )
  161. {
  162. m_OnProxyRelay4.FireOutput( inputdata.pActivator, inputdata.pCaller );
  163. }
  164. void CFuncInstanceIoProxy::InputProxyRelay5( inputdata_t &inputdata )
  165. {
  166. m_OnProxyRelay5.FireOutput( inputdata.pActivator, inputdata.pCaller );
  167. }
  168. void CFuncInstanceIoProxy::InputProxyRelay6( inputdata_t &inputdata )
  169. {
  170. m_OnProxyRelay6.FireOutput( inputdata.pActivator, inputdata.pCaller );
  171. }
  172. void CFuncInstanceIoProxy::InputProxyRelay7( inputdata_t &inputdata )
  173. {
  174. m_OnProxyRelay7.FireOutput( inputdata.pActivator, inputdata.pCaller );
  175. }
  176. void CFuncInstanceIoProxy::InputProxyRelay8( inputdata_t &inputdata )
  177. {
  178. m_OnProxyRelay8.FireOutput( inputdata.pActivator, inputdata.pCaller );
  179. }
  180. void CFuncInstanceIoProxy::InputProxyRelay9( inputdata_t &inputdata )
  181. {
  182. m_OnProxyRelay9.FireOutput( inputdata.pActivator, inputdata.pCaller );
  183. }
  184. void CFuncInstanceIoProxy::InputProxyRelay10( inputdata_t &inputdata )
  185. {
  186. m_OnProxyRelay10.FireOutput( inputdata.pActivator, inputdata.pCaller );
  187. }
  188. void CFuncInstanceIoProxy::InputProxyRelay11( inputdata_t &inputdata )
  189. {
  190. m_OnProxyRelay11.FireOutput( inputdata.pActivator, inputdata.pCaller );
  191. }
  192. void CFuncInstanceIoProxy::InputProxyRelay12( inputdata_t &inputdata )
  193. {
  194. m_OnProxyRelay12.FireOutput( inputdata.pActivator, inputdata.pCaller );
  195. }
  196. void CFuncInstanceIoProxy::InputProxyRelay13( inputdata_t &inputdata )
  197. {
  198. m_OnProxyRelay13.FireOutput( inputdata.pActivator, inputdata.pCaller );
  199. }
  200. void CFuncInstanceIoProxy::InputProxyRelay14( inputdata_t &inputdata )
  201. {
  202. m_OnProxyRelay14.FireOutput( inputdata.pActivator, inputdata.pCaller );
  203. }
  204. void CFuncInstanceIoProxy::InputProxyRelay15( inputdata_t &inputdata )
  205. {
  206. m_OnProxyRelay15.FireOutput( inputdata.pActivator, inputdata.pCaller );
  207. }
  208. void CFuncInstanceIoProxy::InputProxyRelay16( inputdata_t &inputdata )
  209. {
  210. m_OnProxyRelay16.FireOutput( inputdata.pActivator, inputdata.pCaller );
  211. }
  212. void CFuncInstanceIoProxy::InputProxyRelay17( inputdata_t &inputdata )
  213. {
  214. m_OnProxyRelay17.FireOutput( inputdata.pActivator, inputdata.pCaller );
  215. }
  216. void CFuncInstanceIoProxy::InputProxyRelay18( inputdata_t &inputdata )
  217. {
  218. m_OnProxyRelay18.FireOutput( inputdata.pActivator, inputdata.pCaller );
  219. }
  220. void CFuncInstanceIoProxy::InputProxyRelay19( inputdata_t &inputdata )
  221. {
  222. m_OnProxyRelay19.FireOutput( inputdata.pActivator, inputdata.pCaller );
  223. }
  224. void CFuncInstanceIoProxy::InputProxyRelay20( inputdata_t &inputdata )
  225. {
  226. m_OnProxyRelay20.FireOutput( inputdata.pActivator, inputdata.pCaller );
  227. }
  228. void CFuncInstanceIoProxy::InputProxyRelay21( inputdata_t &inputdata )
  229. {
  230. m_OnProxyRelay21.FireOutput( inputdata.pActivator, inputdata.pCaller );
  231. }
  232. void CFuncInstanceIoProxy::InputProxyRelay22( inputdata_t &inputdata )
  233. {
  234. m_OnProxyRelay22.FireOutput( inputdata.pActivator, inputdata.pCaller );
  235. }
  236. void CFuncInstanceIoProxy::InputProxyRelay23( inputdata_t &inputdata )
  237. {
  238. m_OnProxyRelay23.FireOutput( inputdata.pActivator, inputdata.pCaller );
  239. }
  240. void CFuncInstanceIoProxy::InputProxyRelay24( inputdata_t &inputdata )
  241. {
  242. m_OnProxyRelay24.FireOutput( inputdata.pActivator, inputdata.pCaller );
  243. }
  244. void CFuncInstanceIoProxy::InputProxyRelay25( inputdata_t &inputdata )
  245. {
  246. m_OnProxyRelay25.FireOutput( inputdata.pActivator, inputdata.pCaller );
  247. }
  248. void CFuncInstanceIoProxy::InputProxyRelay26( inputdata_t &inputdata )
  249. {
  250. m_OnProxyRelay26.FireOutput( inputdata.pActivator, inputdata.pCaller );
  251. }
  252. void CFuncInstanceIoProxy::InputProxyRelay27( inputdata_t &inputdata )
  253. {
  254. m_OnProxyRelay27.FireOutput( inputdata.pActivator, inputdata.pCaller );
  255. }
  256. void CFuncInstanceIoProxy::InputProxyRelay28( inputdata_t &inputdata )
  257. {
  258. m_OnProxyRelay28.FireOutput( inputdata.pActivator, inputdata.pCaller );
  259. }
  260. void CFuncInstanceIoProxy::InputProxyRelay29( inputdata_t &inputdata )
  261. {
  262. m_OnProxyRelay29.FireOutput( inputdata.pActivator, inputdata.pCaller );
  263. }
  264. void CFuncInstanceIoProxy::InputProxyRelay30( inputdata_t &inputdata )
  265. {
  266. m_OnProxyRelay30.FireOutput( inputdata.pActivator, inputdata.pCaller );
  267. DevWarning( "Maximun Proxy Messages used - ask a programmer for more.\n" );
  268. }