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.
 
 
 
 
 
 

65 lines
1.9 KiB

  1. module CSlipsNotificationVariables
  2. use CVoidEventHandlerCollection
  3. use CIActionReference
  4. implicit none
  5. logical :: SlipsNotification = .false.
  6. procedure (ActionBool), pointer :: SlipsNotificationPtr
  7. public
  8. type(VoidEventHandlerCollection) :: OnSlipsNotificationChange
  9. private :: SlipsNotification
  10. contains
  11. subroutine Set_SlipsNotification(v)
  12. implicit none
  13. logical , intent(in) :: v
  14. #ifdef ExcludeExtraChanges
  15. if(SlipsNotification == v) return
  16. #endif
  17. SlipsNotification = v
  18. if(associated(SlipsNotificationPtr)) call SlipsNotificationPtr(SlipsNotification)
  19. #ifdef deb
  20. print*, 'SlipsNotification=', SlipsNotification
  21. #endif
  22. call OnSlipsNotificationChange%RunAll()
  23. end subroutine
  24. logical function Get_SlipsNotification()
  25. implicit none
  26. Get_SlipsNotification = SlipsNotification
  27. end function
  28. subroutine Set_SlipsNotification_WN(v)
  29. !DEC$ ATTRIBUTES DLLEXPORT :: Set_SlipsNotification_WN
  30. !DEC$ ATTRIBUTES ALIAS: 'Set_SlipsNotification_WN' :: Set_SlipsNotification_WN
  31. implicit none
  32. logical , intent(in) :: v
  33. call Set_SlipsNotification(v)
  34. end subroutine
  35. logical function Get_SlipsNotification_WN()
  36. !DEC$ ATTRIBUTES DLLEXPORT :: Get_SlipsNotification_WN
  37. !DEC$ ATTRIBUTES ALIAS: 'Get_SlipsNotification_WN' :: Get_SlipsNotification_WN
  38. implicit none
  39. Get_SlipsNotification_WN = SlipsNotification
  40. end function
  41. subroutine SubscribeSlipsNotification(a)
  42. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeSlipsNotification
  43. !DEC$ ATTRIBUTES ALIAS: 'SubscribeSlipsNotification' :: SubscribeSlipsNotification
  44. implicit none
  45. procedure (ActionBool) :: a
  46. SlipsNotificationPtr => a
  47. end subroutine
  48. end module CSlipsNotificationVariables