Simulation Core
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.

CTdsTongEnumVariables.f90 2.1 KiB

1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. module CTdsTongEnumVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. integer :: TdsTong = 0
  5. public
  6. type(VoidEventHandlerCollection) :: OnTdsTongChange
  7. enum, bind(c)
  8. enumerator TDS_TONG_BREAKOUT_END
  9. enumerator TDS_TONG_BREAKOUT_BEGIN
  10. enumerator TDS_TONG_MAKEUP_BEGIN
  11. enumerator TDS_TONG_MAKEUP_END
  12. end enum
  13. private :: TdsTong
  14. contains
  15. subroutine Set_TdsTong(v)
  16. implicit none
  17. integer , intent(in) :: v
  18. #ifdef ExcludeExtraChanges
  19. if(TdsTong == v) return
  20. #endif
  21. TdsTong = v
  22. #ifdef deb
  23. print*, 'TdsTong=', TdsTong
  24. #endif
  25. call OnTdsTongChange%RunAll()
  26. end subroutine
  27. integer function Get_TdsTong()
  28. implicit none
  29. Get_TdsTong = TdsTong
  30. end function
  31. subroutine Set_TdsTong_WN(v)
  32. !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsTong_WN
  33. !DEC$ ATTRIBUTES ALIAS: 'Set_TdsTong_WN' :: Set_TdsTong_WN
  34. implicit none
  35. integer , intent(in) :: v
  36. call Set_TdsTong(v)
  37. end subroutine
  38. integer function Get_TdsTong_WN()
  39. !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsTong_WN
  40. !DEC$ ATTRIBUTES ALIAS: 'Get_TdsTong_WN' :: Get_TdsTong_WN
  41. implicit none
  42. Get_TdsTong_WN = TdsTong
  43. end function
  44. subroutine TdsTongBreakoutEnd()
  45. !DEC$ ATTRIBUTES DLLEXPORT :: TdsTongBreakoutEnd
  46. !DEC$ ATTRIBUTES ALIAS: 'TdsTongBreakoutEnd' :: TdsTongBreakoutEnd
  47. implicit none
  48. !if(TdsTong /= TDS_TONG_BREAKOUT_END) TdsTong = TDS_TONG_BREAKOUT_END
  49. call Set_TdsTong(TDS_TONG_BREAKOUT_END)
  50. #ifdef deb
  51. print*, 'TDS_TONG_BREAKOUT_END'
  52. #endif
  53. end subroutine
  54. subroutine TdsTongMakeupEnd()
  55. !DEC$ ATTRIBUTES DLLEXPORT :: TdsTongMakeupEnd
  56. !DEC$ ATTRIBUTES ALIAS: 'TdsTongMakeupEnd' :: TdsTongMakeupEnd
  57. implicit none
  58. !if(TdsTong /= TDS_TONG_MAKEUP_END) TdsTong = TDS_TONG_MAKEUP_END
  59. call Set_TdsTong(TDS_TONG_MAKEUP_END)
  60. #ifdef deb
  61. print*, 'TDS_TONG_MAKEUP_END'
  62. #endif
  63. end subroutine
  64. end module CTdsTongEnumVariables