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.
 
 
 
 
 
 

67 lines
2.1 KiB

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