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.
 
 
 
 
 
 

85 lines
1.9 KiB

  1. module CIbopEnumVariables
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. integer :: Ibop = 0
  5. public
  6. type(VoidEventHandlerCollection) :: OnIbopChange
  7. enum, bind(c)
  8. !enumerator IBOP_NEUTRAL
  9. enumerator IBOP_REMOVE
  10. enumerator IBOP_INSTALL
  11. end enum
  12. private :: Ibop
  13. contains
  14. subroutine Set_Ibop(v)
  15. implicit none
  16. integer , intent(in) :: v
  17. #ifdef ExcludeExtraChanges
  18. if(Ibop == v) return
  19. #endif
  20. Ibop = v
  21. #ifdef deb
  22. print*, 'Ibop=', Ibop
  23. #endif
  24. call OnIbopChange%RunAll()
  25. end subroutine
  26. integer function Get_Ibop()
  27. implicit none
  28. Get_Ibop = Ibop
  29. end function
  30. subroutine Set_Ibop_WN(v)
  31. !DEC$ ATTRIBUTES DLLEXPORT :: Set_Ibop_WN
  32. !DEC$ ATTRIBUTES ALIAS: 'Set_Ibop_WN' :: Set_Ibop_WN
  33. implicit none
  34. integer , intent(in) :: v
  35. call Set_Ibop(v)
  36. end subroutine
  37. integer function Get_Ibop_WN()
  38. !DEC$ ATTRIBUTES DLLEXPORT :: Get_Ibop_WN
  39. !DEC$ ATTRIBUTES ALIAS: 'Get_Ibop_WN' :: Get_Ibop_WN
  40. implicit none
  41. Get_Ibop_WN = Ibop
  42. end function
  43. subroutine Set_Ibop_Install()
  44. implicit none
  45. call Set_Ibop(IBOP_INSTALL)
  46. end subroutine
  47. subroutine Set_Ibop_Remove()
  48. implicit none
  49. call Set_Ibop(IBOP_REMOVE)
  50. end subroutine
  51. logical function Get_RemoveIbop()
  52. !DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveIbop
  53. !DEC$ ATTRIBUTES ALIAS: 'Get_RemoveIbop' :: Get_RemoveIbop
  54. implicit none
  55. Get_RemoveIBop = .false. ! Ibop == REMOVE_IBOP
  56. end function
  57. logical function Get_InstallIbop()
  58. !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallIbop
  59. !DEC$ ATTRIBUTES ALIAS: 'Get_InstallIbop' :: Get_InstallIbop
  60. implicit none
  61. Get_InstallIbop = .false. ! Ibop == INSTALL_IBOP
  62. end function
  63. end module CIbopEnumVariables