|
- module CSafetyValveEnumVariables
- use CVoidEventHandlerCollection
- implicit none
- integer :: SafetyValve = 0
- integer :: operation = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnSafetyValveChange
-
- enum, bind(c)
- enumerator SAFETY_VALVE_NEUTRAL
- enumerator SAFETY_VALVE_REMOVE
- enumerator SAFETY_VALVE_INSTALL
- end enum
-
- private :: SafetyValve
-
- contains
-
- subroutine Set_Operation(i)
- implicit none
- integer, intent (in) :: i
- operation = i
- end subroutine
-
- subroutine Set_SafetyValve(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(SafetyValve == v) return
- #endif
- SafetyValve = v
- #ifdef deb
- if(SafetyValve == SAFETY_VALVE_NEUTRAL) then
- print*, 'SafetyValve=SAFETY_VALVE_NEUTRAL'
- else if (SafetyValve == SAFETY_VALVE_INSTALL) then
- print*, 'SafetyValve=SAFETY_VALVE_INSTALL'
- else if (SafetyValve == SAFETY_VALVE_INSTALL) then
- print*, 'SafetyValve=SAFETY_VALVE_REMOVE'
- endif
- #endif
- call OnSafetyValveChange%RunAll()
- end subroutine
-
- integer function Get_SafetyValve()
- implicit none
- Get_SafetyValve = SafetyValve
- end function
-
-
-
-
- subroutine Set_SafetyValve_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_SafetyValve_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_SafetyValve_WN' :: Set_SafetyValve_WN
- implicit none
- integer , intent(in) :: v
- call Set_SafetyValve(v)
- end subroutine
-
- integer function Get_SafetyValve_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_SafetyValve_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_SafetyValve_WN' :: Get_SafetyValve_WN
- implicit none
- Get_SafetyValve_WN = SafetyValve
- end function
-
-
-
-
-
- subroutine Set_SafetyValve_Install()
- implicit none
- call Set_SafetyValve(SAFETY_VALVE_INSTALL)
- end subroutine
-
- subroutine Set_SafetyValve_Remove()
- implicit none
- call Set_SafetyValve(SAFETY_VALVE_REMOVE)
- end subroutine
-
-
-
-
-
- logical function Get_RemoveSafetyValve()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveSafetyValve
- !DEC$ ATTRIBUTES ALIAS: 'Get_RemoveSafetyValve' :: Get_RemoveSafetyValve
- implicit none
- Get_RemoveSafetyValve = .false. ! SafetyValve == REMOVE_SAFETY_VALVE
- end function
-
- logical function Get_InstallSafetyValve()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallSafetyValve
- !DEC$ ATTRIBUTES ALIAS: 'Get_InstallSafetyValve' :: Get_InstallSafetyValve
- implicit none
- Get_InstallSafetyValve = .false. ! SafetyValve == INSTALL_SAFETY_VALVE
- end function
-
- end module CSafetyValveEnumVariables
|