Ignore:
Timestamp:
Feb 12, 2015, 5:01:11 PM (9 years ago)
Author:
djay
Message:

Add initial doxygen comments in some C files, for future documentation generation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_internal_python.c

    r576 r579  
    1 /**
     1/*
    22 * Author : Gérald FENOY
    33 *
     
    2525#include "service_internal_python.h"
    2626
     27/**
     28 * The state for the zoo Python module
     29 */
    2730struct module_state {
    28     PyObject *error;
     31   PyObject *error;
    2932};
    3033
     
    4346#endif
    4447
     48/**
     49 * The exception for the zoo Python module
     50 */
    4551static PyObject* ZooError;
    4652
     53/**
     54 * Function definitions for the zoo Python Module
     55 *
     56 * Define the following functions available from a service loaded and running
     57 * from the ZOO-Kernel Python environment:
     58 *  - "_" corresponding to the PythonTranslate function
     59 *  - "updte_status" corresponding to the PythonUpdateStatus function
     60 * @see PythonTranslate, PythonUpdateStatus
     61 */
    4762PyMethodDef zooMethods[] = {
    4863  {"_", PythonTranslate, METH_VARARGS, "Translate a string using the zoo-services textdomain."},
     
    7691#endif
    7792
     93/**
     94 * Function to create and initialize the zoo Python module
     95 *
     96 * @return the Python module (for Python versions < 3, nothing for version >=3)
     97 */
    7898PyMODINIT_FUNC init_zoo(){
    7999  PyObject *tmp,*d;
     
    115135}
    116136
     137/**
     138 * Loading a Python module then run the function corresponding to the service
     139 * by passing the conf, inputs and outputs parameters by reference.
     140 *
     141 * @param main_conf the conf maps containing the main.cfg settings
     142 * @param request the map containing the HTTP request
     143 * @param s the service structure
     144 * @param real_inputs the maps containing the inputs
     145 * @param real_outputs the maps containing the outputs
     146 */
    117147int zoo_python_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){
    118148  char *pythonpath;
     
    271301}
    272302
     303/**
     304 * Repport Python error which may occur on loading the Python module or at
     305 * runtime.
     306 *
     307 * @param m the conf maps containing the main.cfg settings
     308 * @param module the service name
     309 * @param load 1 if the Python module was not loaded yet
     310 */
    273311void PythonZooReport(maps* m,const char* module,int load){
    274312  PyObject *pName, *pModule, *pFunc;
     
    335373}
    336374
     375/**
     376 * Convert a maps to a Python dictionary
     377 *
     378 * @param t the maps to convert
     379 * @return a new PyDictObject containing the converted maps
     380 * @see PyDict_FromMap
     381 * @warning make sure to free ressources returned by this function
     382 */
    337383PyDictObject* PyDict_FromMaps(maps* t){
    338384  PyObject* res=PyDict_New( );
     
    351397}
    352398
     399/**
     400 * Convert a map to a Python dictionary
     401 *
     402 * @param t the map to convert
     403 * @return a new PyDictObject containing the converted maps
     404 * @warning make sure to free ressources returned by this function
     405 */
    353406PyDictObject* PyDict_FromMap(map* t){
    354407  PyObject* res=PyDict_New( );
     
    461514}
    462515
     516/**
     517 * Convert a Python dictionary to a maps
     518 *
     519 * @param t the PyDictObject to convert
     520 * @return a new maps containing the converted PyDictObject
     521 * @warning make sure to free ressources returned by this function
     522 */
    463523maps* mapsFromPyDict(PyDictObject* t){
    464524  maps* res=NULL;
     
    501561}
    502562
     563/**
     564 * Convert a Python dictionary to a map
     565 *
     566 * @param t the PyDictObject to convert
     567 * @return a new map containing the converted PyDictObject
     568 * @warning make sure to free ressources returned by this function
     569 */
    503570map* mapFromPyDict(PyDictObject* t){
    504571  map* res=NULL;
     
    540607}
    541608
     609/**
     610 * Use the ZOO-Services messages translation function  from the Python
     611 * environment
     612 *
     613 * @param self the Python object on which we can run the method
     614 * @param args the Python arguments given from the Python environment
     615 * @return a new Python string containing the translated value to the Python
     616 *  environment
     617 * @see _ss
     618 */
    542619PyObject*
    543620PythonTranslate(PyObject* self, PyObject* args)
     
    553630}
    554631
     632/**
     633 * Update the ongoing status of a running service from the Python environment
     634 *
     635 * @param self the Python object on which we can run the method
     636 * @param args the Python arguments given from the Python environment
     637 * @return None to the Python environment
     638 * @see _updateStatus
     639 */
    555640PyObject*
    556641PythonUpdateStatus(PyObject* self, PyObject* args)
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png