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.

CTongNotificationVariables.f90 1.9 KiB

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