Hooks implementation

As discussed in Subsection 9.3.6, when hooks execution is enabled, implementation-specific instrumentation is executed. Using the --generate-hooks option on the Babel command line when generating implementation-side bindings results in the automatic generation of a _pre and _post method for every static and non-static method associated with each class in the specification. For the aStaticMethod specified in Subsection 9.3.6, the generated _pre method implementation is$:$


recursive subroutine hooks_Basics_aStaticMeth_pre_mi(i, io, exception)
  use sidl
  use sidl_NotImplementedException
  use sidl_BaseInterface
  use sidl_RuntimeException
  use hooks_Basics
  use hooks_Basics_impl
  ! DO-NOT-DELETE splicer.begin(hooks.Basics.aStaticMeth_pre.use)
  !   Insert implementation use details
  ! DO-NOT-DELETE splicer.end(hooks.Basics.aStaticMeth_pre.use)
  implicit none
  integer (kind=sidl_int) :: i ! in
  integer (kind=sidl_int) :: io ! in
  type(sidl_BaseInterface_t) :: exception ! out

! DO-NOT-DELETE splicer.begin(hooks.Basics.aStaticMeth_pre)
!
!   Add instrumentation here to be executed immediately prior
!   to dispatch to aStaticMeth().
!
! DO-NOT-DELETE splicer.end(hooks.Basics.aStaticMeth_pre)
end subroutine hooks_Basics_aStaticMeth_pre_mi

while that of the _post method is$:$


recursive subroutine B_aStaticMeth_postywgp49zzy2_mi(i, o, io, retval,         &
  exception)
  use sidl
  use sidl_NotImplementedException
  use sidl_BaseInterface
  use sidl_RuntimeException
  use hooks_Basics
  use hooks_Basics_impl
  ! DO-NOT-DELETE splicer.begin(hooks.Basics.aStaticMeth_post.use)
  !   Insert implementation use details
  ! DO-NOT-DELETE splicer.end(hooks.Basics.aStaticMeth_post.use)
  implicit none
  integer (kind=sidl_int) :: i ! in
  integer (kind=sidl_int) :: o ! in
  integer (kind=sidl_int) :: io ! in
  integer (kind=sidl_int) :: retval ! in
  type(sidl_BaseInterface_t) :: exception ! out

! DO-NOT-DELETE splicer.begin(hooks.Basics.aStaticMeth_post)
!
!    Add instrumentation here to be executed immediately after
!    return from dispatch to aStaticMeth().
!
  return
! DO-NOT-DELETE splicer.end(hooks.Basics.aStaticMeth_post)
end subroutine B_aStaticMeth_postywgp49zzy2_mi

Per the normal implementation process, the desired instrumentation should be added within the splicer blocks of aStaticMethod_pre and aStaticMethod_post. As stated in the comments within those blocks, aStaticMethod_pre will be executed immediately prior to dispatch to aStaticMethod when the latter is invoked by a client. Assuming no exceptions are encountered, aStaticMethod_post is executed immediately upon return from aStaticMethod.





babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov