module CHeadEnumVariables use CVoidEventHandlerCollection implicit none integer :: FillupHead = 0 public type(VoidEventHandlerCollection) :: OnFillupHeadChange enum, bind(c) !enumerator FILLUP_HEAD_NEUTRAL enumerator FILLUP_HEAD_REMOVE enumerator FILLUP_HEAD_INSTALL end enum private :: FillupHead contains subroutine Set_FillupHead(v) use CManifolds, only: ToggleFillupHead implicit none integer , intent(in) :: v #ifdef ExcludeExtraChanges if(FillupHead == v) return #endif FillupHead = v if (FillupHead == FILLUP_HEAD_INSTALL) then call ToggleFillupHead(.true.) else if (FillupHead == FILLUP_HEAD_REMOVE) then call ToggleFillupHead(.false.) endif #ifdef deb print*, 'FillupHead=', FillupHead #endif call OnFillupHeadChange%RunAll() end subroutine integer function Get_FillupHead() implicit none Get_FillupHead = FillupHead end function subroutine Set_FillupHead_WN(v) !DEC$ ATTRIBUTES DLLEXPORT :: Set_FillupHead_WN !DEC$ ATTRIBUTES ALIAS: 'Set_FillupHead_WN' :: Set_FillupHead_WN implicit none integer , intent(in) :: v call Set_FillupHead(v) end subroutine integer function Get_FillupHead_WN() !DEC$ ATTRIBUTES DLLEXPORT :: Get_FillupHead_WN !DEC$ ATTRIBUTES ALIAS: 'Get_FillupHead_WN' :: Get_FillupHead_WN implicit none Get_FillupHead_WN = FillupHead end function logical function Get_RemoveFillupHead() !DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveFillupHead !DEC$ ATTRIBUTES ALIAS: 'Get_RemoveFillupHead' :: Get_RemoveFillupHead implicit none Get_RemoveFillupHead = .false. ! FillupHead == REMOVE_FILLUP_HEAD end function logical function Get_InstallFillupHead() !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallFillupHead !DEC$ ATTRIBUTES ALIAS: 'Get_InstallFillupHead' :: Get_InstallFillupHead implicit none Get_InstallFillupHead = .false. ! FillupHead == INSTALL_FILLUP_HEAD end function end module CHeadEnumVariables