fortran.slc.txt: Thanks to Tom/Gary/Tammy and Wael Babel Requirements - create a stand-alone distribution - no CCA specifics CCA Requirements - ease of use Suggestions - put some Babel specific files in framework libraries Finding - too many files - too many types? - should a generic type be used Suggestions - move general files into a library (Base.., array...) - combine files where possible Finding - generating setServices (and ctor/dtor) prone to mistakes Suggestions - framework should generate setServices (Fortran and C++) - must update tutorials Finding - must generate all language client-side bindings Suggestions - ? - packaging an issue Finding - scary include pattern #include gov_cca_Services_fAbbrev.h" use gov_cca_Services_type Suggestions - many technical suggestions to Babel CCA Fortran Bindings -------------------- use ? call setData(self, data) call getData(self, data) call getPort(self, 'IntegratorPort', integrator, exception) call integrate(integrator, 0.0D0, 1.0D0, 1000, result) call releasePort(self, 'IntegratorPort', integrator, exception) - packaging? ========================================================================== tutorial_Driver_Impl.F90.tom: ! ! File: tutorial_Driver_Impl.F90 ! Symbol: tutorial.Driver-v1.0 ! Symbol Type: class ! Babel Version: 0.8.4 ! SIDL Created: 20030407 13:50:30 PDT ! Generated: 20030407 13:50:36 PDT ! Description: Server-side implementation for tutorial.Driver ! ! WARNING: Automatically generated; only changes within splicers preserved ! ! babel-version = 0.8.4 ! source-line = 3 ! source-url = file:/home/epperly/current/f90_component/sidl/driver-f90/../driver.sidl ! ! ! Symbol "tutorial.Driver" (version 1.0) ! #include "gov_cca_Port_fAbbrev.h" #include "gov_cca_Services_fAbbrev.h" #include "tutorial_Driver_fAbbrev.h" #include "SIDL_BaseInterface_fAbbrev.h" #include "SIDL_BaseClass_fAbbrev.h" #include "SIDL_ClassInfo_fAbbrev.h" #include "gov_cca_ports_GoPort_fAbbrev.h" #include "gov_cca_Component_fAbbrev.h" ! DO-NOT-DELETE splicer.begin(_miscellaneous_code_start) #include "integrators_Integrator_fAbbrev.h" #include "SIDL_BaseException_fAbbrev.h" ! DO-NOT-DELETE splicer.end(_miscellaneous_code_start) ! ! Class constructor called when the class is created. ! recursive subroutine tutorial_Driver__ctor_mi(self) use tutorial_Driver use tutorial_Driver_impl ! DO-NOT-DELETE splicer.begin(tutorial.Driver._ctor.use) use gov_cca_Services ! DO-NOT-DELETE splicer.end(tutorial.Driver._ctor.use) implicit none type(tutorial_Driver_t) :: self ! DO-NOT-DELETE splicer.begin(tutorial.Driver._ctor) type(tutorial_Driver_wrap) :: pd external tutorial_Driver__set_data_m allocate(pd%d_private_data) call set_null(pd%d_private_data%d_services) call tutorial_Driver__set_data_m(self, pd) ! DO-NOT-DELETE splicer.end(tutorial.Driver._ctor) end subroutine tutorial_Driver__ctor_mi ! ! Class destructor called when the class is deleted. ! recursive subroutine tutorial_Driver__dtor_mi(self) use tutorial_Driver use tutorial_Driver_impl ! DO-NOT-DELETE splicer.begin(tutorial.Driver._dtor.use) use gov_cca_Services ! DO-NOT-DELETE splicer.end(tutorial.Driver._dtor.use) implicit none type(tutorial_Driver_t) :: self ! DO-NOT-DELETE splicer.begin(tutorial.Driver._dtor) type(tutorial_Driver_wrap) :: pd external tutorial_Driver__get_data_m call tutorial_Driver__get_data_m(self, pd) if (not_null(pd%d_private_data%d_services)) then call deleteRef(pd%d_private_data%d_services) call set_null(pd%d_private_data%d_services) end if deallocate(pd%d_private_data) ! DO-NOT-DELETE splicer.end(tutorial.Driver._dtor) end subroutine tutorial_Driver__dtor_mi ! ! Execute some encapsulated functionality on the component. ! Return 0 if ok, -1 if internal error but component may be ! used further, and -2 if error so severe that component cannot ! be further used safely. ! recursive subroutine tutorial_Driver_go_mi(self, retval) use tutorial_Driver use tutorial_Driver_impl ! DO-NOT-DELETE splicer.begin(tutorial.Driver.go.use) use gov_cca_Port use gov_cca_Services use integrators_Integrator use SIDL_BaseException ! DO-NOT-DELETE splicer.end(tutorial.Driver.go.use) implicit none type(tutorial_Driver_t) :: self integer (selected_int_kind(9)) :: retval ! DO-NOT-DELETE splicer.begin(tutorial.Driver.go) real(selected_real_kind(15,307)) :: lowerBnd, upperBnd, result type(tutorial_Driver_wrap) :: pd type(gov_cca_Port_t) :: port type(integrators_Integrator_t) :: intPort type(SIDL_BaseException_t) :: excpt external tutorial_Driver__get_data_m call tutorial_Driver__get_data_m(self, pd) call getPort(pd%d_private_data%d_services, 'IntegratorPort', port, excpt) if (is_null(port)) then print *, 'Driver: getPort() returns null port' retval = -1 return end if call cast(port, intPort) if (is_null(intPort)) then print *, 'Driver: cast() returns null intPort' retval = -1 return end if lowerBnd = 0.0 upperBnd = 1.0 call integrate(intPort, lowerBnd, upperBnd, 1000, result) print *, 'Value = ', result retval = 0 call deleteRef(port) call releasePort(pd%d_private_data%d_services, 'IntegratorPort', excpt) ! DO-NOT-DELETE splicer.end(tutorial.Driver.go) end subroutine tutorial_Driver_go_mi ! ! Obtain Services handle, through which the ! component communicates with the framework. ! This is the one method that every CCA Component ! must implement. ! recursive subroutine tutorial_Driver_setServices_mi(self, services) use gov_cca_Services use tutorial_Driver use tutorial_Driver_impl ! DO-NOT-DELETE splicer.begin(tutorial.Driver.setServices.use) use gov_cca_Services ! DO-NOT-DELETE splicer.end(tutorial.Driver.setServices.use) implicit none type(tutorial_Driver_t) :: self type(gov_cca_Services_t) :: services ! DO-NOT-DELETE splicer.begin(tutorial.Driver.setServices) type(tutorial_Driver_wrap) :: pd external tutorial_Driver__get_data_m call tutorial_Driver__get_data_m(self, pd) if (not_null(pd%d_private_data%d_services)) then call deleteRef(pd%d_private_data%d_services) end if pd%d_private_data%d_services = services if (not_null(services)) then call addRef(services) endif ! DO-NOT-DELETE splicer.end(tutorial.Driver.setServices) end subroutine tutorial_Driver_setServices_mi ! DO-NOT-DELETE splicer.begin(_miscellaneous_code_end) ! Insert extra code here... ! DO-NOT-DELETE splicer.end(_miscellaneous_code_end) ================================================================ ! ------------------- component constructor section --------- ! DO-NOT-DELETE splicer.begin(tutorial.Driver._ctor) type(tutorial_Driver_wrap) :: data_wrapper allocate(data_wrapper%d_private_data) call tutorial_Driver__set_data_m(self, data_wrapper) ! additional constructor statements here... ! DO-NOT-DELETE splicer.end(tutorial.Driver._ctor) ! ------------------- component destructor section ---------- ! DO-NOT-DELETE splicer.begin(tutorial.Driver._dtor) type(tutorial_Driver_wrap) :: data_wrapper call tutorial_Driver__get_data_m(self, data_wrapper) deallocate(data_wrapper%d_private_data) ! additional destructor statements here... ! DO-NOT-DELETE splicer.end(tutorial.Driver._dtor) ! ------------------------- method section ------------------ ! DO-NOT-DELETE splicer.begin(tutorial.Driver.go) ! DO-NOT-DELETE splicer.end(tutorial.Driver.go) ! ----------------------- setServices section --------------- ! DO-NOT-DELETE splicer.begin(tutorial.Driver.setServices.use) use SIDL_BaseException ! DO-NOT-DELETE splicer.end(tutorial.Driver.setServices.use) ! DO-NOT-DELETE splicer.begin(tutorial.Driver.setServices) type(tutorial_Driver_wrap) :: data_wrapper type(gov_cca_TypeMap_t) :: type_map type(gov_cca_Port_t) :: port type(SIDL_BaseException_t) :: exception call tutorial_Driver__get_data_m(self, data_wrapper) data_wrapper%d_private_data%services = services call AddRef(services) call createTypeMap(services, type_map, exception) if (not_null(exception)) then print *, 'tutorial.Driver.setServices, exception thrown on createTypeMap' end if call cast(self, port) call addProvidesPort(data_wrapper%d_private_data%services, port, & 'GoPort', 'gov.cca.GoPort', type_map, exception) if (not_null(exception)) then print *, 'tutorial.Driver.setServices, exception thrown on addProvidesPort' end if call registerUsesPort(data_wrapper%d_private_data%services, & 'IntegratorPort', 'tutorial.Integrator', type_map, exception) if (not_null(exception)) then print *, 'tutorial.Driver.setServices, exception thrown on registerUsesPort' end if ! DO-NOT-DELETE splicer.end(tutorial.Driver.setServices) ======================================================================== tutorial_Driver_Mod.F90.tom: ! ! File: tutorial_Driver_Mod.F90 ! Symbol: tutorial.Driver-v1.0 ! Symbol Type: class ! Babel Version: 0.8.4 ! SIDL Created: 20030407 13:50:30 PDT ! Generated: 20030407 13:50:36 PDT ! Description: Server-side private data module for tutorial.Driver ! ! WARNING: Automatically generated; only changes within splicers preserved ! ! babel-version = 0.8.4 ! source-line = 3 ! source-url = file:/home/epperly/current/f90_component/sidl/driver-f90/../driver.sidl ! #include"tutorial_Driver_fAbbrev.h" module tutorial_Driver_impl ! DO-NOT-DELETE splicer.begin(tutorial.Driver.use) #include "gov_cca_Services_fAbbrev.h" use gov_cca_Services_type ! DO-NOT-DELETE splicer.end(tutorial.Driver.use) type tutorial_Driver_private sequence ! DO-NOT-DELETE splicer.begin(tutorial.Driver.private_data) type(gov_cca_Services_t) :: d_services ! DO-NOT-DELETE splicer.end(tutorial.Driver.private_data) end type tutorial_Driver_private type tutorial_Driver_wrap sequence type(tutorial_Driver_private), pointer :: d_private_data end type tutorial_Driver_wrap end module tutorial_Driver_impl