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 CLog1
  2. use CIActionReference
  3. implicit none
  4. public
  5. interface Log_1
  6. module procedure :: Log1Log1, Log1Log2, Log1Log3, Log1Log4, Log1Log5
  7. end interface
  8. procedure (ActionString), pointer :: Log1MsgPtr
  9. procedure (ActionStringInt), pointer :: Log1MsgIntPtr
  10. procedure (ActionStringFloat), pointer :: Log1MsgFloatPtr
  11. procedure (ActionStringDouble), pointer :: Log1MsgDoublePtr
  12. procedure (ActionStringBool), pointer :: Log1MsgBoolPtr
  13. contains
  14. subroutine Log1Log1(message)
  15. implicit none
  16. character(len=*), intent(in) :: message
  17. #ifdef Log1
  18. if(associated(Log1MsgPtr)) call Log1MsgPtr(message)
  19. #endif
  20. end subroutine
  21. subroutine Log1Log2(message, value)
  22. implicit none
  23. character(len=*), intent(in) :: message
  24. integer, intent(in) :: value
  25. #ifdef Log1
  26. if(associated(Log1MsgIntPtr)) call Log1MsgIntPtr(message, value)
  27. #endif
  28. end subroutine
  29. subroutine Log1Log3(message, value)
  30. implicit none
  31. character(len=*), intent(in) :: message
  32. real, intent(in) :: value
  33. #ifdef Log1
  34. if(associated(Log1MsgFloatPtr)) call Log1MsgFloatPtr(message, value)
  35. #endif
  36. end subroutine
  37. subroutine Log1Log4(message, value)
  38. implicit none
  39. character(len=*), intent(in) :: message
  40. real(8), intent(in) :: value
  41. #ifdef Log1
  42. if(associated(Log1MsgDoublePtr)) call Log1MsgDoublePtr(message, value)
  43. #endif
  44. end subroutine
  45. subroutine Log1Log5(message, value)
  46. implicit none
  47. character(len=*), intent(in) :: message
  48. logical, intent(in) :: value
  49. #ifdef Log1
  50. if(associated(Log1MsgBoolPtr)) call Log1MsgBoolPtr(message, value)
  51. #endif
  52. end subroutine
  53. subroutine SubscribeLog1Message(a)
  54. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog1Message
  55. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog1Message' :: SubscribeLog1Message
  56. implicit none
  57. procedure (ActionString) :: a
  58. Log1MsgPtr => a
  59. end subroutine
  60. subroutine SubscribeLog1MsgInt(a)
  61. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog1MsgInt
  62. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog1MsgInt' :: SubscribeLog1MsgInt
  63. implicit none
  64. procedure (ActionStringInt) :: a
  65. Log1MsgIntPtr => a
  66. end subroutine
  67. subroutine SubscribeLog1MsgFloat(a)
  68. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog1MsgFloat
  69. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog1MsgFloat' :: SubscribeLog1MsgFloat
  70. implicit none
  71. procedure (ActionStringFloat) :: a
  72. Log1MsgFloatPtr => a
  73. end subroutine
  74. subroutine SubscribeLog1MsgDouble(a)
  75. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog1MsgDouble
  76. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog1MsgDouble' :: SubscribeLog1MsgDouble
  77. implicit none
  78. procedure (ActionStringDouble) :: a
  79. Log1MsgDoublePtr => a
  80. end subroutine
  81. subroutine SubscribeLog1MsgBool(a)
  82. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLog1MsgBool
  83. !DEC$ ATTRIBUTES ALIAS: 'SubscribeLog1MsgBool' :: SubscribeLog1MsgBool
  84. implicit none
  85. procedure (ActionStringBool) :: a
  86. Log1MsgBoolPtr => a
  87. end subroutine
  88. end module CLog1