|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- module CKellyConnectionEnumVariables
- use CVoidEventHandlerCollection
- implicit none
- integer :: KellyConnection = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnKellyConnectionChange
-
- enum, bind(c)
- enumerator KELLY_CONNECTION_NOTHING
- enumerator KELLY_CONNECTION_STRING
- enumerator KELLY_CONNECTION_SINGLE
- end enum
-
- private :: KellyConnection
- contains
-
- subroutine Set_KellyConnection(v)
- use CManifolds, Only: KellyConnected, KellyDisconnected
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(KellyConnection == v) return
- #endif
-
- KellyConnection = v
-
- if(KellyConnection /= KELLY_CONNECTION_STRING) then
- call KellyDisconnected()
- else
- call KellyConnected()
- endif
-
- #ifdef deb
- print*, 'KellyConnection=', KellyConnection
- #endif
- call OnKellyConnectionChange%RunAll()
- end subroutine
-
- integer function Get_KellyConnection()
- implicit none
- Get_KellyConnection = KellyConnection
- end function
-
-
-
-
-
-
- subroutine Set_KellyConnection_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_KellyConnection_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_KellyConnection_WN' :: Set_KellyConnection_WN
- implicit none
- integer , intent(in) :: v
- call Set_KellyConnection(v)
- end subroutine
-
- integer function Get_KellyConnection_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_KellyConnection_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_KellyConnection_WN' :: Get_KellyConnection_WN
- implicit none
- Get_KellyConnection_WN = KellyConnection
- end function
-
- end module CKellyConnectionEnumVariables
|