Open thisisashukla opened 7 years ago
The Flow of Control for a pgRouting function is as follows:
1. SQL File: sql\myFunction\myFunction.sql -> This file contains the signature of the function and calls the C function code of the function
2. C Code: src\myFunction\src\myFunction.c -> This file contains myFunction's call to process. The C code retrieves the arguments from the PostgreSQL parameters and converts them to corresponding C types.
3. C/C++ Driver: _include\drivers\myFunction\myFunction_driver.h_ -> This file contains both C and C++ code and this links the C function to the C++ driver
4. C++ Driver: _src\myFunction\src\myFunction_driver.cpp_ -> Connects the previous code to the C++ code
5. C++ Code: Contains the algorithm which performs the required tasks
6. Tests:
SQL -> fn C code -> process -> _driver.h is C/C++ -> _driver.cpp -> C++(does it all)