SlideServe
Menu
Préférences
© SlideServe · v2026

Developing Applications with SIDL

wtuttle avatar
13 diapositives · 177 Views · Dec 20, 2019

Learn how to add, compile, edit code in SIDL for efficient application development. Includes tips on compiling projects, committing changes, and building drivers in different languages.

Developing Applications with SIDL - slide 1
01 / 13Developing Applications with SIDL
1 / 17

Télécharger la présentation

Developing Applications with SIDL
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Developing Applicationswith SIDL ANL SIDL Team MCS Division, ANL April 2003

  2. Basic Strategy • Add new SIDL • Compile SIDL • Edit generated code • Compile project • Commit changes

  3. Adding new SIDL • Only new classes produce implementation files • Interfaces produce only IOR and client files • Interfaces/classes outside the current package must be fully qualified

  4. Example I package Example { interface Greet { void sayHello(); } class HelloWorld implements-all Greet { static void shoutHello(); } }

  5. Compiling SIDL • The default target handles SIDL • There is also a target with ignores dependencies and only compiles SIDL ./make.py ./make.py sidl

  6. Editing Generated Code • Implementation files are in the server • Impl files contain splicer blocks • Bk edit the file you wish to change • Insert code between the markers • Bitkeeper is the default • Other RC systems could be used server-<lang>-<file>/<package>/<class>_impl

  7. Example II #ifndef included_SIDL_Example_HelloWorld_impl #include "SIDL/Example/HelloWorld_impl/HelloWorld_impl.hh“ #endif // DO-NOT-DELETE splicer.begin(SIDL.Example.HelloWorld.sayHello._includes) #include <iostream> // DO-NOT-DELETE splicer.end(SIDL.Example.HelloWorld.sayHello._includes) void SIDL::Example::HelloWorld_impl::sayHello() throw ( ::SIDL::NullIORException) { // DO-NOT-DELETE splicer.begin(SIDL.Example.HelloWorld.sayHello) std::cout << "Hello World" << std::endl; // DO-NOT-DELETE splicer.end(SIDL.Example.HelloWorld.sayHello) }

  8. Compiling the Project • The default target handles compilation • There is also a target that only compiles • SIDL dependencies are also handled • Also builds all dependencies ./make.py compile

  9. Commit the Changes • Changes to Impl files must be committed to Bitkeeper • Use the graphical check-in tool • Then push to the parent bk citool bk push

  10. Adding a Driver • Code driver • Compile and link driver • Run driver

  11. Coding a Driver • Use the bindings for the driver language • Located in client-<lang> • Multiple source files can be used • Multiple languages can also be used • Please reconsider using Fortran

  12. Building the Driver • Python is EASY, just make calls • Additions to the makefile • List of driver source • Location of driver executable • Put driver source in input files • Driver build target ./make.py compilePrograms

  13. Makefile Driver Example def defineSource(self): import build.fileset url = self.project.getUrl() self.filesets[‘programs’] = build.fileset.RootedFileSet(url, [os.path.join(‘bin’, ‘basicTests’)], mustExist = 0) self.filesets[‘basicTestsSource’] = build.fileset.RootedFileSet(url, [os.path.join(‘driver’, ‘cxx’, ‘basicTests.cc’)] tag = ‘cxx executable basicTests’ self.filesets[‘sidl’].children.append(self.fileset[‘basicTestsSource’]) return def setupBuild(self): self.defineSource() self.sidlTemplate.addServer(‘Python’) return