|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- module CTongEnumVariables
- use CVoidEventHandlerCollection
- use CLog4
- implicit none
- integer :: Tong = 0
- integer :: Tong_S = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnTongChange
-
- enum, bind(c)
- enumerator TONG_NEUTRAL
- enumerator TONG_BREAKOUT_BEGIN
- enumerator TONG_BREAKOUT_END
- enumerator TONG_MAKEUP_BEGIN
- enumerator TONG_MAKEUP_END
- end enum
-
- private :: Tong
-
- contains
-
- subroutine Set_Tong(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(Tong == v) return
- #endif
- Tong = v
- #ifdef deb
- !if(Tong==TONG_NEUTRAL) then
- ! print*, 'Tong=TONG_NEUTRAL'
- !else if(Tong==TONG_BREAKOUT) then
- ! print*, 'Tong=TONG_BREAKOUT'
- !else if(Tong==TONG_MAKEUP) then
- ! print*, 'Tong=TONG_MAKEUP'
- !endif
- print*, 'Tong=', Tong
- #endif
- call OnTongChange%RunAll()
- end subroutine
-
- integer function Get_Tong()
- implicit none
- Get_Tong = Tong
- end function
-
-
-
- subroutine Set_Tong_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_Tong_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_Tong_WN' :: Set_Tong_WN
- implicit none
- integer , intent(in) :: v
- !call Set_Tong(v)
- Tong_S = v
- end subroutine
-
- integer function Get_Tong_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_Tong_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_Tong_WN' :: Get_Tong_WN
- implicit none
- Get_Tong_WN = Tong
- end function
-
-
-
-
-
-
-
-
-
- subroutine TongBreakoutEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: TongBreakoutEnd
- !DEC$ ATTRIBUTES ALIAS: 'TongBreakoutEnd' :: TongBreakoutEnd
- implicit none
- !if(Tong /= TONG_BREAKOUT_END) then
- ! Tong = TONG_BREAKOUT_END
- !endif
- call Set_Tong(TONG_BREAKOUT_END)
- #ifdef deb
- print*, 'TONG_BREAKOUT_END'
- #endif
- end subroutine
-
-
- subroutine TongMakeupEnd()
- !DEC$ ATTRIBUTES DLLEXPORT :: TongMakeupEnd
- !DEC$ ATTRIBUTES ALIAS: 'TongMakeupEnd' :: TongMakeupEnd
- implicit none
- !if(Tong /= TONG_MAKEUP_END) then
- ! Tong = TONG_MAKEUP_END
- !
- !endif
- call Set_Tong(TONG_MAKEUP_END)
- #ifdef deb
- print*, 'TONG_MAKEUP_END'
- #endif
- end subroutine
-
-
-
-
-
-
-
-
-
-
-
-
-
- logical function Get_TongBreakout()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_TongBreakout
- !DEC$ ATTRIBUTES ALIAS: 'Get_TongBreakout' :: Get_TongBreakout
- implicit none
- Get_TongBreakout = .false. ! Tong == TONG_BREAKOUT
- end function
-
- logical function Get_TongMakeup()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_TongMakeup
- !DEC$ ATTRIBUTES ALIAS: 'Get_TongMakeup' :: Get_TongMakeup
- implicit none
- Get_TongMakeup = .false. ! Tong == TONG_MAKEUP
- end function
-
- end module CTongEnumVariables
|