|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- module CSwingEnumVariables
- use CVoidEventHandlerCollection
- use CLog4
- implicit none
- integer :: Swing = 0
- integer :: Swing_S = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnSwingChange
-
- enum, bind(c)
- enumerator SWING_NEUTRAL
- enumerator SWING_MOUSE_HOLE_BEGIN
- enumerator SWING_MOUSE_HOLE_END
- enumerator SWING_RAT_HOLE_BEGIN
- enumerator SWING_RAT_HOLE_END
- enumerator SWING_WELL_BEGIN
- enumerator SWING_WELL_END
- end enum
-
- private :: Swing
-
- contains
-
- subroutine Set_Swing(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(Swing == v) return
- #endif
- Swing = v
- #ifdef deb
- print*, 'Swing=', Swing
- #endif
- call OnSwingChange%RunAll()
- end subroutine
-
- integer function Get_Swing()
- implicit none
- Get_Swing = Swing
- end function
-
-
- subroutine Set_Swing_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_Swing_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_Swing_WN' :: Set_Swing_WN
- implicit none
- integer , intent(in) :: v
- !call Set_Swing(v)
- Swing_S = v
- end subroutine
-
- integer function Get_Swing_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_Swing_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_Swing_WN' :: Get_Swing_WN
- implicit none
- Get_Swing_WN = Swing
- end function
-
-
-
-
-
-
-
- subroutine SwingMouseHoleEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: SwingMouseHoleEnd
- !DEC$ ATTRIBUTES ALIAS: 'SwingMouseHoleEnd' :: SwingMouseHoleEnd
- implicit none
- !if(Swing /= SWING_MOUSE_HOLE_END) Swing = SWING_MOUSE_HOLE_END
- call Set_Swing(SWING_MOUSE_HOLE_END)
- #ifdef deb
- print*, 'SWING_MOUSE_HOLE_END'
- #endif
- end subroutine
-
-
- subroutine SwingRatHoleEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: SwingRatHoleEnd
- !DEC$ ATTRIBUTES ALIAS: 'SwingRatHoleEnd' :: SwingRatHoleEnd
- implicit none
- !if(Swing /= SWING_RAT_HOLE_END) Swing = SWING_RAT_HOLE_END
- call Set_Swing(SWING_RAT_HOLE_END)
- #ifdef deb
- print*, 'SWING_RAT_HOLE_END'
- #endif
- end subroutine
-
-
- subroutine SwingWellEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: SwingWellEnd
- !DEC$ ATTRIBUTES ALIAS: 'SwingWellEnd' :: SwingWellEnd
- implicit none
- !if(Swing /= SWING_WELL_END) Swing = SWING_WELL_END
- call Set_Swing(SWING_WELL_END)
- #ifdef deb
- print*, 'SWING_WELL_END'
- #endif
- end subroutine
-
-
-
-
-
-
-
-
-
-
-
-
-
- logical function Get_SwingMouseHole()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingMouseHole
- !DEC$ ATTRIBUTES ALIAS: 'Get_SwingMouseHole' :: Get_SwingMouseHole
- implicit none
- Get_SwingMouseHole = .false. ! Swing == SWING_MOUSE_HOLE
- end function
-
- logical function Get_SwingRatHole()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingRatHole
- !DEC$ ATTRIBUTES ALIAS: 'Get_SwingRatHole' :: Get_SwingRatHole
- implicit none
- Get_SwingRatHole = .false. ! Swing == SWING_RAT_HOLE
- end function
-
- logical function Get_SwingWell()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_SwingWell
- !DEC$ ATTRIBUTES ALIAS: 'Get_SwingWell' :: Get_SwingWell
- implicit none
- Get_SwingWell = .false. ! Swing == SWING_WELL
- end function
-
- end module CSwingEnumVariables
|