Bindings implementation

Implementation details must be added to the ``Impl'' files generated in Subsection 11.4.1. Changes to these files must be made between code splicer pairs to ensure their retention in subsequent invocations of Babel. In fact, Babel generates everything except the code that appears between splicer blocks (i.e., splicer.begin and splicer.end comments). That is, it creates a class definition and empty methods in files whose names end in _Impl.py. Code placed within matching splicer pairs will be preserved in subsequent executions of Babel while changes outside them will be lost.

Using the example from Subsection 11.2.2, the splicer blocks and implementation details for passeverywhere are$:$


  def passeverywhere(self, d1, d3):
    #
    # SIDL EXPECTED INCOMING TYPES
    # ============================
    # double d1
    # double d3
    #

    #
    # SIDL EXPECTED RETURN VALUE(s)
    # =============================
    # (_return, d2, d3)
    # double _return
    # double d2
    # double d3
    #

    # DO-NOT-DELETE splicer.begin(passeverywhere)
    if (d1 == 3.14):
      retval = 3.14
    else:
      retval = 0
    return (retval, 3.14, -d3)
    # DO-NOT-DELETE splicer.end(passeverywhere)





babel-1.4.0
users_guide Last Modified 2008-10-16

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