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.
 
 
 
 
 
 

37 lines
872 B

  1. module CHookHeight
  2. use CVoidEventHandlerCollection
  3. implicit none
  4. real :: HookHeight = 0
  5. public
  6. type(VoidEventHandlerCollection) :: OnHookHeightChange
  7. private :: HookHeight
  8. contains
  9. subroutine Set_HookHeight(v)
  10. implicit none
  11. real , intent(in) :: v
  12. #ifdef ExcludeExtraChanges
  13. if(HookHeight == v) return
  14. #endif
  15. HookHeight = v
  16. #ifdef deb
  17. print*, 'HookHeight=', HookHeight
  18. #endif
  19. call OnHookHeightChange%RunAll()
  20. end subroutine
  21. real function Get_HookHeight()
  22. implicit none
  23. Get_HookHeight = HookHeight
  24. end function
  25. subroutine Subscribe_HookHeight()
  26. use CHookVariables, only: OnHookHeight => OnHookHeightChange
  27. implicit none
  28. call OnHookHeight%Add(Set_HookHeight)
  29. end subroutine
  30. end module CHookHeight