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.

CStringUpdateVariables.f90 1.5 KiB

1 year ago
1 year ago
1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. module CStringUpdateVariables
  2. use CIntegerEventHandlerCollection
  3. implicit none
  4. integer :: StringUpdate = 0
  5. public
  6. !**type(IntegerEventHandlerCollection) :: OnStringUpdateChange
  7. enum, bind(c)
  8. enumerator STRING_UPDATE_NEUTRAL
  9. enumerator STRING_UPDATE_ADD_SINGLE
  10. enumerator STRING_UPDATE_ADD_STAND
  11. enumerator STRING_UPDATE_REMOVE_SINGLE
  12. enumerator STRING_UPDATE_REMOVE_STAND
  13. end enum
  14. private :: StringUpdate
  15. contains
  16. subroutine Set_StringUpdate(v)
  17. implicit none
  18. integer , intent(in) :: v
  19. #ifdef ExcludeExtraChanges
  20. if(StringUpdate == v) return
  21. #endif
  22. StringUpdate = v
  23. call OnStringUpdateChange%RunAll(v)
  24. end subroutine
  25. integer function Get_StringUpdate()
  26. implicit none
  27. Get_StringUpdate = StringUpdate
  28. end function
  29. subroutine Set_StringUpdate_WN(v)
  30. !DEC$ ATTRIBUTES DLLEXPORT :: Set_StringUpdate_WN
  31. !DEC$ ATTRIBUTES ALIAS: 'Set_StringUpdate_WN' :: Set_StringUpdate_WN
  32. implicit none
  33. integer , intent(in) :: v
  34. call Set_StringUpdate(v)
  35. end subroutine
  36. integer function Get_StringUpdate_WN()
  37. !DEC$ ATTRIBUTES DLLEXPORT :: Get_StringUpdate_WN
  38. !DEC$ ATTRIBUTES ALIAS: 'Get_StringUpdate_WN' :: Get_StringUpdate_WN
  39. implicit none
  40. Get_StringUpdate_WN = StringUpdate
  41. end function
  42. end module CStringUpdateVariables