module CLog2 use CIActionReference implicit none public interface Log_2 module procedure :: Log2Log1, Log2Log2, Log2Log3, Log2Log4, Log2Log5 end interface procedure (ActionString), pointer :: Log2MsgPtr procedure (ActionStringInt), pointer :: Log2MsgIntPtr procedure (ActionStringFloat), pointer :: Log2MsgFloatPtr procedure (ActionStringDouble), pointer :: Log2MsgDoublePtr procedure (ActionStringBool), pointer :: Log2MsgBoolPtr contains subroutine Log2Log1(message) implicit none character(len=*), intent(in) :: message #ifdef Log2 if(associated(Log2MsgPtr)) call Log2MsgPtr(message) #endif end subroutine subroutine Log2Log2(message, value) implicit none character(len=*), intent(in) :: message integer, intent(in) :: value #ifdef Log2 if(associated(Log2MsgIntPtr)) call Log2MsgIntPtr(message, value) #endif end subroutine subroutine Log2Log3(message, value) implicit none character(len=*), intent(in) :: message real, intent(in) :: value #ifdef Log2 if(associated(Log2MsgFloatPtr)) call Log2MsgFloatPtr(message, value) #endif end subroutine subroutine Log2Log4(message, value) implicit none character(len=*), intent(in) :: message real(8), intent(in) :: value #ifdef Log2 if(associated(Log2MsgDoublePtr)) call Log2MsgDoublePtr(message, value) #endif end subroutine subroutine Log2Log5(message, value) implicit none character(len=*), intent(in) :: message logical, intent(in) :: value #ifdef Log2 if(associated(Log2MsgBoolPtr)) call Log2MsgBoolPtr(message, value) #endif end subroutine subroutine SubscribeLog2Message(a) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog2Message !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog2Message' :: SubscribeLog2Message implicit none procedure (ActionString) :: a Log2MsgPtr => a end subroutine subroutine SubscribeLog2MsgInt(a) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog2MsgInt !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog2MsgInt' :: SubscribeLog2MsgInt implicit none procedure (ActionStringInt) :: a Log2MsgIntPtr => a end subroutine subroutine SubscribeLog2MsgFloat(a) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog2MsgFloat !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog2MsgFloat' :: SubscribeLog2MsgFloat implicit none procedure (ActionStringFloat) :: a Log2MsgFloatPtr => a end subroutine subroutine SubscribeLog2MsgDouble(a) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog2MsgDouble !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog2MsgDouble' :: SubscribeLog2MsgDouble implicit none procedure (ActionStringDouble) :: a Log2MsgDoublePtr => a end subroutine subroutine SubscribeLog2MsgBool(a) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog2MsgBool !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog2MsgBool' :: SubscribeLog2MsgBool implicit none procedure (ActionStringBool) :: a Log2MsgBoolPtr => a end subroutine end module CLog2