|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- module COperationConditionEnumVariables
- use CIntegerEventHandlerCollection
- use CVoidEventHandlerCollection
- implicit none
- integer :: OperationCondition = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnOperationConditionChange
- type(IntegerEventHandlerCollection) :: OnOperationConditionChangeInt
-
- enum, bind(c)
- enumerator OPERATION_DRILL
- enumerator OPERATION_TRIP
- end enum
-
- private :: OperationCondition
-
- contains
-
- subroutine Set_OperationCondition(v)
- use CKellyEnumVariables
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(OperationCondition == v) return
- #endif
- OperationCondition = v
- #ifdef deb
- print*, 'OperationCondition=', OperationCondition
- #endif
- call OnOperationConditionChange%RunAll()
- call OnOperationConditionChangeInt%RunAll(OperationCondition)
- end subroutine
-
- integer function Get_OperationCondition()
- implicit none
- Get_OperationCondition = OperationCondition
- end function
-
-
- subroutine Set_OperationCondition_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_OperationCondition_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_OperationCondition_WN' :: Set_OperationCondition_WN
- implicit none
- integer , intent(in) :: v
- call Set_OperationCondition(v)
- end subroutine
-
- integer function Get_OperationCondition_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_OperationCondition_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_OperationCondition_WN' :: Get_OperationCondition_WN
- implicit none
- Get_OperationCondition_WN = OperationCondition
- end function
-
-
-
-
-
-
-
-
-
-
-
- logical function Get_DrillCondition()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_DrillCondition
- !DEC$ ATTRIBUTES ALIAS: 'Get_DrillCondition' :: Get_DrillCondition
- implicit none
- Get_DrillCondition = OperationCondition == OPERATION_DRILL
- end function
-
- logical function Get_TripCondition()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_TripCondition
- !DEC$ ATTRIBUTES ALIAS: 'Get_TripCondition' :: Get_TripCondition
- implicit none
- Get_TripCondition = OperationCondition == OPERATION_TRIP
- end function
-
- end module COperationConditionEnumVariables
|