|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- module CBucketEnumVariables
- use CVoidEventHandlerCollection
- implicit none
- integer :: MudBucket = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnMudBucketChange
-
- enum, bind(c)
- !enumerator MUD_BUCKET_NEUTRAL
- enumerator MUD_BUCKET_REMOVE
- enumerator MUD_BUCKET_INSTALL
- end enum
-
- private :: MudBucket
-
- contains
-
- subroutine Set_MudBucket(v)
- use CManifolds, only: ToggleMudBox
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(MudBucket == v) return
- #endif
- MudBucket = v
- if (MudBucket == MUD_BUCKET_INSTALL) then
- call ToggleMudBox(.true.)
- else if (MudBucket == MUD_BUCKET_REMOVE) then
- call ToggleMudBox(.false.)
- endif
- #ifdef deb
- print*, 'MudBucket=', MudBucket
- #endif
- call OnMudBucketChange%RunAll()
- end subroutine
-
- integer function Get_MudBucket()
- implicit none
- Get_MudBucket = MudBucket
- end function
-
-
-
- subroutine Set_MudBucket_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_MudBucket_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_MudBucket_WN' :: Set_MudBucket_WN
- implicit none
- integer , intent(in) :: v
- call Set_MudBucket(v)
- end subroutine
-
- integer function Get_MudBucket_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_MudBucket_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_MudBucket_WN' :: Get_MudBucket_WN
- implicit none
- Get_MudBucket_WN = MudBucket
- end function
-
-
-
-
-
- logical function Get_RemoveMudBucket()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveMudBucket
- !DEC$ ATTRIBUTES ALIAS: 'Get_RemoveMudBucket' :: Get_RemoveMudBucket
- implicit none
- Get_RemoveMudBucket = .false. ! MudBucket == REMOVE_MUD_BUCKET
- end function
-
- logical function Get_InstallMudBucket()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallMudBucket
- !DEC$ ATTRIBUTES ALIAS: 'Get_InstallMudBucket' :: Get_InstallMudBucket
- implicit none
- Get_InstallMudBucket = .false. ! MudBucket == INSTALL_MUD_BUCKET
- end function
-
- end module CBucketEnumVariables
|