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.
 
 
 
 
 
 

79 lines
1.8 KiB

  1. module CKellyEnumVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. integer :: Kelly = 0
  5. integer :: Kelly_S = 0
  6. public
  7. type(VoidEventHandlerCollection) :: OnKellyChange
  8. enum, bind(c)
  9. enumerator KELLY_NEUTRAL
  10. enumerator KELLY_INSTALL
  11. enumerator KELLY_REMOVE
  12. end enum
  13. private :: Kelly
  14. contains
  15. subroutine Set_Kelly(v)
  16. implicit none
  17. integer , intent(in) :: v
  18. #ifdef ExcludeExtraChanges
  19. if(Kelly == v) return
  20. #endif
  21. Kelly = v
  22. #ifdef deb
  23. print*, 'Kelly=', Kelly
  24. #endif
  25. call OnKellyChange%RunAll()
  26. end subroutine
  27. integer function Get_Kelly()
  28. implicit none
  29. Get_Kelly = Kelly
  30. end function
  31. subroutine Set_Kelly_WN(v)
  32. !DEC$ ATTRIBUTES DLLEXPORT :: Set_Kelly_WN
  33. !DEC$ ATTRIBUTES ALIAS: 'Set_Kelly_WN' :: Set_Kelly_WN
  34. implicit none
  35. integer , intent(in) :: v
  36. !call Set_Kelly(v)
  37. Kelly_S = v
  38. end subroutine
  39. integer function Get_Kelly_WN()
  40. !DEC$ ATTRIBUTES DLLEXPORT :: Get_Kelly_WN
  41. !DEC$ ATTRIBUTES ALIAS: 'Get_Kelly_WN' :: Get_Kelly_WN
  42. implicit none
  43. Get_Kelly_WN = Kelly
  44. end function
  45. logical function Get_KellyBack()
  46. !DEC$ ATTRIBUTES DLLEXPORT :: Get_KellyBack
  47. !DEC$ ATTRIBUTES ALIAS: 'Get_KellyBack' :: Get_KellyBack
  48. implicit none
  49. Get_KellyBack = .false. ! Kelly == KELLY_BACK
  50. end function
  51. logical function Get_InstallKelly()
  52. !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallKelly
  53. !DEC$ ATTRIBUTES ALIAS: 'Get_InstallKelly' :: Get_InstallKelly
  54. implicit none
  55. Get_InstallKelly = .false. ! Kelly == INSTALL_KELLY
  56. end function
  57. end module CKellyEnumVariables