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.

CLog5.f90 3.3 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. module CLog5
  2. use CIActionReference
  3. implicit none
  4. public
  5. interface Log_5
  6. module procedure :: Log5Log1, Log5Log2, Log5Log3, Log5Log4, Log5Log5
  7. end interface
  8. procedure (ActionString), pointer :: Log5MsgPtr
  9. procedure (ActionStringInt), pointer :: Log5MsgIntPtr
  10. procedure (ActionStringFloat), pointer :: Log5MsgFloatPtr
  11. procedure (ActionStringDouble), pointer :: Log5MsgDoublePtr
  12. procedure (ActionStringBool), pointer :: Log5MsgBoolPtr
  13. contains
  14. subroutine Log5Log1(message)
  15. implicit none
  16. character(len=*), intent(in) :: message
  17. #ifdef Log5
  18. if(associated(Log5MsgPtr)) call Log5MsgPtr(message)
  19. #endif
  20. end subroutine
  21. subroutine Log5Log2(message, value)
  22. implicit none
  23. character(len=*), intent(in) :: message
  24. integer, intent(in) :: value
  25. #ifdef Log5
  26. if(associated(Log5MsgIntPtr)) call Log5MsgIntPtr(message, value)
  27. #endif
  28. end subroutine
  29. subroutine Log5Log3(message, value)
  30. implicit none
  31. character(len=*), intent(in) :: message
  32. real, intent(in) :: value
  33. #ifdef Log5
  34. if(associated(Log5MsgFloatPtr)) call Log5MsgFloatPtr(message, value)
  35. #endif
  36. end subroutine
  37. subroutine Log5Log4(message, value)
  38. implicit none
  39. character(len=*), intent(in) :: message
  40. real(8), intent(in) :: value
  41. #ifdef Log5
  42. if(associated(Log5MsgDoublePtr)) call Log5MsgDoublePtr(message, value)
  43. #endif
  44. end subroutine
  45. subroutine Log5Log5(message, value)
  46. implicit none
  47. character(len=*), intent(in) :: message
  48. logical, intent(in) :: value
  49. #ifdef Log5
  50. if(associated(Log5MsgBoolPtr)) call Log5MsgBoolPtr(message, value)
  51. #endif
  52. end subroutine
  53. subroutine SubscribeLog5Message(a)
  54. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog5Message
  55. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog5Message' :: SubscribeLog5Message
  56. implicit none
  57. procedure (ActionString) :: a
  58. Log5MsgPtr => a
  59. end subroutine
  60. subroutine SubscribeLog5MsgInt(a)
  61. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog5MsgInt
  62. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog5MsgInt' :: SubscribeLog5MsgInt
  63. implicit none
  64. procedure (ActionStringInt) :: a
  65. Log5MsgIntPtr => a
  66. end subroutine
  67. subroutine SubscribeLog5MsgFloat(a)
  68. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog5MsgFloat
  69. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog5MsgFloat' :: SubscribeLog5MsgFloat
  70. implicit none
  71. procedure (ActionStringFloat) :: a
  72. Log5MsgFloatPtr => a
  73. end subroutine
  74. subroutine SubscribeLog5MsgDouble(a)
  75. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog5MsgDouble
  76. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog5MsgDouble' :: SubscribeLog5MsgDouble
  77. implicit none
  78. procedure (ActionStringDouble) :: a
  79. Log5MsgDoublePtr => a
  80. end subroutine
  81. subroutine SubscribeLog5MsgBool(a)
  82. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog5MsgBool
  83. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog5MsgBool' :: SubscribeLog5MsgBool
  84. implicit none
  85. procedure (ActionStringBool) :: a
  86. Log5MsgBoolPtr => a
  87. end subroutine
  88. end module CLog5