The next step in developing components requires you implement the component's intended functionality within the Bocca -generated skeleton. There are two places that we have to change things to make that happen: add methods to the interface definitions (.sidl file) and then put the implementation code into the components in the language chosen in Section 3.1.
Because Bocca generates all the files in the project, it knows where to find the code associated with each SIDL symbol. Using the bocca edit command, you can specify the SIDL symbol you're interested in and Bocca will bring up the appropriate file in your editor of choice. Additionally, after you exit the editor, Bocca regenerates all other source files that depend on the source file edited.
| $ | bocca edit SIDL_SYMBOL |
| $ | bocca edit -m SIDL_CLASS |
| $ | bocca edit -i SIDL_CLASS |
| $ | bocca edit -i SIDL_CLASS METHOD_NAME |
The last invocation requires that your editor support the +N option, which is used for specifying the initial position in the file. All emacs and vi versions support this feature. If your favorite editor does not support +N, omit the method name and search for it in the opened file using the editor's search capability.
If you replace edit in any of the above, with whereis, Bocca prints out the path of the file that would be edited without starting up an editor.
The environment variable BOCCA_EDITOR (and if that is not set, then EDITOR) controls what editor gets invoked by bocca edit.
| Tip If you need to set BOCCA_EDITOR to get the editor you want, you might want to add the appropriate setting to your login files. |
| Tip Users of emacs may want to set BOCCA_EDITOR to ``emacs -nw'' when editing on a remote cluster with slow or no X11 connections. |
There is also a way for you to tell Bocca that you've edited a file by some means other than bocca edit.
| $ | bocca edit --touch FunctionPort |
| $ | bocca edit --touch -i Driver |
If you do not tell Bocca about files you've modified, you might find that the project's files are not in a consistent state. For example, if you add a method to a .sidl file it will not appear it in the implementation file until Bocca updates it.
2010-08-11