Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

113 lines
3.4 KiB

  1. module CLog4
  2. use CIActionReference
  3. implicit none
  4. public
  5. interface Log_4
  6. module procedure :: Log4Log1, Log4Log2, Log4Log3, Log4Log4, Log4Log5
  7. end interface
  8. procedure (ActionString), pointer :: Log4MsgPtr
  9. procedure (ActionStringInt), pointer :: Log4MsgIntPtr
  10. procedure (ActionStringFloat), pointer :: Log4MsgFloatPtr
  11. procedure (ActionStringDouble), pointer :: Log4MsgDoublePtr
  12. procedure (ActionStringBool), pointer :: Log4MsgBoolPtr
  13. contains
  14. subroutine Log4Log1(message)
  15. implicit none
  16. character(len=*), intent(in) :: message
  17. #ifdef Log4
  18. if(associated(Log4MsgPtr)) call Log4MsgPtr(message)
  19. #endif
  20. end subroutine
  21. subroutine Log4Log2(message, value)
  22. implicit none
  23. character(len=*), intent(in) :: message
  24. integer, intent(in) :: value
  25. #ifdef Log4
  26. if(associated(Log4MsgIntPtr)) call Log4MsgIntPtr(message, value)
  27. #endif
  28. end subroutine
  29. subroutine Log4Log3(message, value)
  30. implicit none
  31. character(len=*), intent(in) :: message
  32. real, intent(in) :: value
  33. #ifdef Log4
  34. if(associated(Log4MsgFloatPtr)) call Log4MsgFloatPtr(message, value)
  35. #endif
  36. end subroutine
  37. subroutine Log4Log4(message, value)
  38. implicit none
  39. character(len=*), intent(in) :: message
  40. real(8), intent(in) :: value
  41. #ifdef Log4
  42. if(associated(Log4MsgDoublePtr)) call Log4MsgDoublePtr(message, value)
  43. #endif
  44. end subroutine
  45. subroutine Log4Log5(message, value)
  46. implicit none
  47. character(len=*), intent(in) :: message
  48. logical, intent(in) :: value
  49. #ifdef Log4
  50. if(associated(Log4MsgBoolPtr)) call Log4MsgBoolPtr(message, value)
  51. #endif
  52. end subroutine
  53. subroutine SubscribeLog4Message(a)
  54. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog4Message
  55. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog4Message' :: SubscribeLog4Message
  56. implicit none
  57. procedure (ActionString) :: a
  58. Log4MsgPtr => a
  59. end subroutine
  60. subroutine SubscribeLog4MsgInt(a)
  61. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog4MsgInt
  62. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog4MsgInt' :: SubscribeLog4MsgInt
  63. implicit none
  64. procedure (ActionStringInt) :: a
  65. Log4MsgIntPtr => a
  66. end subroutine
  67. subroutine SubscribeLog4MsgFloat(a)
  68. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog4MsgFloat
  69. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog4MsgFloat' :: SubscribeLog4MsgFloat
  70. implicit none
  71. procedure (ActionStringFloat) :: a
  72. Log4MsgFloatPtr => a
  73. end subroutine
  74. subroutine SubscribeLog4MsgDouble(a)
  75. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog4MsgDouble
  76. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog4MsgDouble' :: SubscribeLog4MsgDouble
  77. implicit none
  78. procedure (ActionStringDouble) :: a
  79. Log4MsgDoublePtr => a
  80. end subroutine
  81. subroutine SubscribeLog4MsgBool(a)
  82. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog4MsgBool
  83. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog4MsgBool' :: SubscribeLog4MsgBool
  84. implicit none
  85. procedure (ActionStringBool) :: a
  86. Log4MsgBoolPtr => a
  87. end subroutine
  88. end module CLog4