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.

CLog3.f90 3.3 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. module CLog3
  2. use CIActionReference
  3. implicit none
  4. public
  5. interface Log_3
  6. module procedure :: Log3Log1, Log3Log2, Log3Log3, Log3Log4, Log3Log5
  7. end interface
  8. procedure (ActionString), pointer :: Log3MsgPtr
  9. procedure (ActionStringInt), pointer :: Log3MsgIntPtr
  10. procedure (ActionStringFloat), pointer :: Log3MsgFloatPtr
  11. procedure (ActionStringDouble), pointer :: Log3MsgDoublePtr
  12. procedure (ActionStringBool), pointer :: Log3MsgBoolPtr
  13. contains
  14. subroutine Log3Log1(message)
  15. implicit none
  16. character(len=*), intent(in) :: message
  17. #ifdef Log3
  18. if(associated(Log3MsgPtr)) call Log3MsgPtr(message)
  19. #endif
  20. end subroutine
  21. subroutine Log3Log2(message, value)
  22. implicit none
  23. character(len=*), intent(in) :: message
  24. integer, intent(in) :: value
  25. #ifdef Log3
  26. if(associated(Log3MsgIntPtr)) call Log3MsgIntPtr(message, value)
  27. #endif
  28. end subroutine
  29. subroutine Log3Log3(message, value)
  30. implicit none
  31. character(len=*), intent(in) :: message
  32. real, intent(in) :: value
  33. #ifdef Log3
  34. if(associated(Log3MsgFloatPtr)) call Log3MsgFloatPtr(message, value)
  35. #endif
  36. end subroutine
  37. subroutine Log3Log4(message, value)
  38. implicit none
  39. character(len=*), intent(in) :: message
  40. real(8), intent(in) :: value
  41. #ifdef Log3
  42. if(associated(Log3MsgDoublePtr)) call Log3MsgDoublePtr(message, value)
  43. #endif
  44. end subroutine
  45. subroutine Log3Log5(message, value)
  46. implicit none
  47. character(len=*), intent(in) :: message
  48. logical, intent(in) :: value
  49. #ifdef Log3
  50. if(associated(Log3MsgBoolPtr)) call Log3MsgBoolPtr(message, value)
  51. #endif
  52. end subroutine
  53. subroutine SubscribeLog3Message(a)
  54. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog3Message
  55. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog3Message' :: SubscribeLog3Message
  56. implicit none
  57. procedure (ActionString) :: a
  58. Log3MsgPtr => a
  59. end subroutine
  60. subroutine SubscribeLog3MsgInt(a)
  61. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog3MsgInt
  62. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog3MsgInt' :: SubscribeLog3MsgInt
  63. implicit none
  64. procedure (ActionStringInt) :: a
  65. Log3MsgIntPtr => a
  66. end subroutine
  67. subroutine SubscribeLog3MsgFloat(a)
  68. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog3MsgFloat
  69. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog3MsgFloat' :: SubscribeLog3MsgFloat
  70. implicit none
  71. procedure (ActionStringFloat) :: a
  72. Log3MsgFloatPtr => a
  73. end subroutine
  74. subroutine SubscribeLog3MsgDouble(a)
  75. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog3MsgDouble
  76. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog3MsgDouble' :: SubscribeLog3MsgDouble
  77. implicit none
  78. procedure (ActionStringDouble) :: a
  79. Log3MsgDoublePtr => a
  80. end subroutine
  81. subroutine SubscribeLog3MsgBool(a)
  82. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog3MsgBool
  83. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog3MsgBool' :: SubscribeLog3MsgBool
  84. implicit none
  85. procedure (ActionStringBool) :: a
  86. Log3MsgBoolPtr => a
  87. end subroutine
  88. end module CLog3