As discussed in Subsection 8.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 8.3.6, the generated _pre method
implementation is
subroutine hooks_Basics_aStaticMeth_pre_fi(i, io, exception) implicit none C in int i integer*4 i C in int io integer*4 io C out sidl.BaseInterface exception integer*8 exception C DO-NOT-DELETE splicer.begin(hooks.Basics.aStaticMeth_pre) C C Add instrumentation here to be executed immediately prior C to dispatch to aStaticMeth(). C C DO-NOT-DELETE splicer.end(hooks.Basics.aStaticMeth_pre) end
while that of the _post method is
subroutine hooks_Basics_aStaticMeth_post_fi(i, o, io, retval, & exception) implicit none C in int i integer*4 i C in int o integer*4 o C in int io integer*4 io C in int retval integer*4 retval C out sidl.BaseInterface exception integer*8 exception C DO-NOT-DELETE splicer.begin(hooks.Basics.aStaticMeth_post) C C Add instrumentation here to be executed immediately after C return from dispatch to aStaticMeth(). C return C DO-NOT-DELETE splicer.end(hooks.Basics.aStaticMeth_post) end
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.