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.
 
 
 
 
 
 

68 lines
1.8 KiB

  1. module CTdsConnectionModesEnumVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. integer :: TdsConnectionModes = 0
  5. public
  6. type(VoidEventHandlerCollection) :: OnTdsConnectionModesChange
  7. enum, bind(c)
  8. enumerator TDS_CONNECTION_NOTHING
  9. enumerator TDS_CONNECTION_STRING
  10. enumerator TDS_CONNECTION_SPINE
  11. end enum
  12. private :: TdsConnectionModes
  13. contains
  14. subroutine Set_TdsConnectionModes(v)
  15. use CManifolds, Only: KellyConnected, KellyDisconnected
  16. implicit none
  17. integer , intent(in) :: v
  18. #ifdef ExcludeExtraChanges
  19. if(TdsConnectionModes == v) return
  20. #endif
  21. TdsConnectionModes = v
  22. if(TdsConnectionModes == TDS_CONNECTION_NOTHING) then
  23. call KellyDisconnected()
  24. else
  25. call KellyConnected()
  26. endif
  27. #ifdef deb
  28. print*, 'TdsConnectionModes=', TdsConnectionModes
  29. #endif
  30. call OnTdsConnectionModesChange%RunAll()
  31. end subroutine
  32. integer function Get_TdsConnectionModes()
  33. implicit none
  34. Get_TdsConnectionModes = TdsConnectionModes
  35. end function
  36. subroutine Set_TdsConnectionModes_WN(v)
  37. !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsConnectionModes_WN
  38. !DEC$ ATTRIBUTES ALIAS: 'Set_TdsConnectionModes_WN' :: Set_TdsConnectionModes_WN
  39. implicit none
  40. integer , intent(in) :: v
  41. call Set_TdsConnectionModes(v)
  42. end subroutine
  43. integer function Get_TdsConnectionModes_WN()
  44. !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsConnectionModes_WN
  45. !DEC$ ATTRIBUTES ALIAS: 'Get_TdsConnectionModes_WN' :: Get_TdsConnectionModes_WN
  46. implicit none
  47. Get_TdsConnectionModes_WN = TdsConnectionModes
  48. end function
  49. end module CTdsConnectionModesEnumVariables