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.

CTdsSpineEnumVariables.f90 2.2 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. module CTdsSpineEnumVariables
  2. use CVoidEventHandlerCollection
  3. use CLog4
  4. implicit none
  5. integer :: TdsSpine = 0
  6. public
  7. type(VoidEventHandlerCollection) :: OnTdsSpineChange
  8. enum, bind(c)
  9. enumerator TDS_SPINE_NEUTRAL
  10. enumerator TDS_SPINE_CONNECT_BEGIN
  11. enumerator TDS_SPINE_CONNECT_END
  12. enumerator TDS_SPINE_DISCONNECT_BEGIN
  13. enumerator TDS_SPINE_DISCONNECT_END
  14. end enum
  15. private :: TdsSpine
  16. contains
  17. subroutine Set_TdsSpine(v)
  18. implicit none
  19. integer , intent(in) :: v
  20. #ifdef ExcludeExtraChanges
  21. if(TdsSpine == v) return
  22. #endif
  23. TdsSpine = v
  24. #ifdef deb
  25. print*, 'TdsSpine=', TdsSpine
  26. #endif
  27. call OnTdsSpineChange%RunAll()
  28. end subroutine
  29. integer function Get_TdsSpine()
  30. implicit none
  31. Get_TdsSpine = TdsSpine
  32. end function
  33. subroutine Set_TdsSpine_WN(v)
  34. !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsSpine_WN
  35. !DEC$ ATTRIBUTES ALIAS: 'Set_TdsSpine_WN' :: Set_TdsSpine_WN
  36. implicit none
  37. integer , intent(in) :: v
  38. call Set_TdsSpine(v)
  39. end subroutine
  40. integer function Get_TdsSpine_WN()
  41. !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsSpine_WN
  42. !DEC$ ATTRIBUTES ALIAS: 'Get_TdsSpine_WN' :: Get_TdsSpine_WN
  43. implicit none
  44. Get_TdsSpine_WN = TdsSpine
  45. end function
  46. subroutine TdsSpineConnectEnd()
  47. !DEC$ ATTRIBUTES DLLEXPORT :: TdsSpineConnectEnd
  48. !DEC$ ATTRIBUTES ALIAS: 'TdsSpineConnectEnd' :: TdsSpineConnectEnd
  49. implicit none
  50. !if(TdsSpine /= TDS_SPINE_CONNECT_END) TdsSpine = TDS_SPINE_CONNECT_END
  51. call Set_TdsSpine(TDS_SPINE_CONNECT_END)
  52. #ifdef deb
  53. print*, 'TDS_SPINE_CONNECT_END'
  54. #endif
  55. end subroutine
  56. subroutine TdsSpineDisconnectEnd()
  57. !DEC$ ATTRIBUTES DLLEXPORT :: TdsSpineDisconnectEnd
  58. !DEC$ ATTRIBUTES ALIAS: 'TdsSpineDisconnectEnd' :: TdsSpineDisconnectEnd
  59. implicit none
  60. !if(TdsSpine /= TDS_SPINE_DISCONNECT_END) TdsSpine = TDS_SPINE_DISCONNECT_END
  61. call Set_TdsSpine(TDS_SPINE_DISCONNECT_END)
  62. #ifdef deb
  63. print*, 'TDS_SPINE_DISCONNECT_END'
  64. #endif
  65. end subroutine
  66. end module CTdsSpineEnumVariables