root/saga/trunk/docs/manual/adaptor_guide/tex/saga_adaptor_guide_writing.tex

Revision 3241, 2.5 kB (checked in by amerzky, 11 months ago)

added a section about adaptor writing. Should be extended.
A

Line 
1
2 \subsection{Overview}
3
4  The SAGA C++ sources include an adaptor generator, which allows to
5  easily create stubs for custom adaptors.  The script is located in
6
7  \shift |adaptors/generator/generator.pl|
8
9  The shell session shown below results in a complete ssh file adaptor:
10
11  \begin{mycode}
12    # cd adaptors/generator
13    # ./generator.pl -p ssh -t file -d /tmp/
14
15      prefix:            ssh
16      type:              file
17      directory:         ../ssh_adaptors/ssh/ssh_file
18
19      copying files:     ...
20      fixing file names: .............
21      fixing files:      ..............
22
23      You can now cd to /tmp/ssh/ssh_file,
24      and run 'make; make install'. 
25
26      Note that you need to set SAGA_LOCATION before,
27      and point it to your SAGA installation tree.
28
29    # cd /tmp/ssh/ssh_file/
30    # make
31       check        ssh_file_adaptor_file_perm_impl.cpp
32       check        ssh_file_adaptor_file_nsentry_impl.cpp
33       check        ssh_file_adaptor_file_impl.cpp
34       check        ssh_file_adaptor_dir_perm_impl.cpp
35       check        ssh_file_adaptor_dir_nsentry_impl.cpp
36       check        ssh_file_adaptor_dir_nsdir_impl.cpp
37       check        ssh_file_adaptor_dir_impl.cpp
38       check        ssh_file_adaptor.cpp
39       compiling    ssh_file_adaptor.o
40       compiling    ssh_file_adaptor_dir_impl.o
41       compiling    ssh_file_adaptor_dir_nsdir_impl.o
42       compiling    ssh_file_adaptor_dir_nsentry_impl.o
43       compiling    ssh_file_adaptor_dir_perm_impl.o
44       compiling    ssh_file_adaptor_file_impl.o
45       compiling    ssh_file_adaptor_file_nsentry_impl.o
46       compiling    ssh_file_adaptor_file_perm_impl.o
47       liblinking   libsaga_adaptor_ssh_file.dylib
48       liblinking   libsaga_adaptor_ssh_file.a (static)
49    
50    # make install
51       installing   lib
52       installing   lib (static)
53       installing   adaptor ini
54  \end{mycode}
55
56   When running any SAGA application, that adaptor will get loaded and
57   will receive requests to perform remote operations.  That can be
58   confirmed by setting |SAGA_VERBOSE| in the application environment
59   (see SAGA installation guide).
60
61   Of course, that adaptor will not be able to perform any meaningful
62   operation -- it is just a stub, and will simply throw
63   |NotImplemented| exceptions for all calls.  However, it is now
64   straight forward to fill the stub with the respective functionality. 
65
66   \F{Need to add details about class hierarchy, adaptor data, and
67   instance data. Also, some details about adaptor makefiles, configure
68   support etc might be useful.}
69
Note: See TracBrowser for help on using the browser.