This directory contains an example of how to bind the C++ functions in
the API library with C code, i.e. C code calling C++ code.

There are four files:

Makefile:
 Builds the example code (note - aimed at a Solaris installation).

rsfapi_wrapper.cc:
 A C++ wrapper where functions are declared that call the RSFAPI
 C++ functions, which in turn are then called by the C code.

rsfapi_example.c:
 The main C routine that calls the functions implemented in the
 rsfapi_wrapper.cc file.

rsfapi_wrapper.h:
 This is the header file that the C and C++ files should include.
 Note that this has two declarations worthy of note, firstly:

     #if defined(__cplusplus) || defined(c_plusplus)
     #define C "C"
     #else
     #define C
     #endif

     extern C unsigned node_count_c(char* host);

 This in affect is the glue between the C and the C++ code; when
 compiled with a C++ compiler the 'C' declaration tells the C++
 compiler that the external information sent to the linker should 
 use C calling conventions and name mangling (e.g., preceded by a 
 single underscore). Since name overloading isn't supported by
 C, you can't make several overloaded functions simultaneously 
 callable by a C program). For the C compiler 'extern C' becomes
 'extern' and as such is a normal C declaration - the important
 bit here is both C and C++ source files can include this header
 without error.

 And secondly the statement:

     #define RSF1_BASEDIR /opt/HAC/RSF-1

 Tells the API where the RSF-1 base directory can be found, if not
 specified then the default is set to /opt/HAC/RSF-1 (the same path)
 but most importantly, will throw a warning up to say it is using
 the default directory, so this simply suppresses this error.
