/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/py.h

  • Committer: Vasilii Chernov
  • Date: 2016-03-01 16:17:46 UTC
  • mto: This revision was merged to the branch mainline in revision 367.
  • Revision ID: vchernov@inr.ru-20160301161746-3cd0z12j1s5u0zvn
update documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
 *  @return             - NULL or cloned pcilib_py_t content pointer on success
126
126
 */
127
127
pcilib_py_t* pcilib_init_py_ctx(pcilib_py_t* in, int *err);
 
128
 
 
129
/**
 
130
 * @brief pcilib_t independent variant  pcilib_free_py
 
131
 * @param ctx_py[in,out] - pcilib_py_t context
 
132
 */
 
133
void pcilib_free_py_ctx(pcilib_py_t *ctx_py);
 
134
 
 
135
/** pcilib_t independent variant of pcilib_py_eval_func()
 
136
 * @param ctx_py[in,out] - pcilib_py_t context
 
137
 * @param name[in] - script name
 
138
 * @param name[in] - function name
 
139
 * @param pyval[in] - input value (will be decref in this fucntion)
 
140
 * @param err[out] - error
 
141
 * @return value returned by python function
 
142
 */
128
143
pcilib_py_object* pcilib_py_ctx_eval_func(pcilib_py_t *ctx_py,
129
 
                                          const char *script_name,
 
144
                                          const char *name,
130
145
                                          const char *func_name, 
131
146
                                          pcilib_py_object *pyval, 
132
147
                                          int *err);
133
 
int pcilib_py_ctx_add_script_dir(pcilib_py_t *ctx_py, const char *dir);
134
 
void pcilib_free_py_ctx(pcilib_py_t *ctx_py);
135
 
int pcilib_py_ctx_load_script(pcilib_py_t *ctx_py, const char *script_name);
 
148
 
 
149
/**
 
150
 * @brief pcilib_t independent variant of pcilib_py_add_script_dir
 
151
 * @param ctx_py[in,out] - pcilib_py_t context
 
152
 * @param[in] location  - NULL or path to additional scripts
 
153
 * @return
 
154
 */
 
155
int pcilib_py_ctx_add_script_dir(pcilib_py_t *ctx_py, const char *location);
 
156
 
 
157
/**
 
158
 * @brief pcilib_t independent variant of pcilib_py_load_script
 
159
 * @param ctx_py[in,out] - pcilib_py_t context
 
160
 * @param[in] name      - script name, the passed variable is referenced and, hence, should have static duration
 
161
 * @return
 
162
 */
 
163
int pcilib_py_ctx_load_script(pcilib_py_t *ctx_py, const char *name);
 
164
 
 
165
/**
 
166
 * @brief Returns information about scripts aviable in model
 
167
 * @param ctx_py[in,out] - pcilib_py_t context
 
168
 * @return List with information about scripts
 
169
 */
136
170
pcilib_py_object *pcilib_py_ctx_get_scripts_info(pcilib_py_t *ctx_py);
137
171
 
138
 
/*!
139
 
 * \brief Wrap for PyDict_SetItem, with decrease reference counting after set.
 
172
/** Wrap for PyDict_SetItem, with decrease reference counting after set.
140
173
 */
141
174
void pcilib_pydict_set_item(pcilib_py_object* dict, pcilib_py_object* name, pcilib_py_object* value);
142
175
 
143
 
/*!
144
 
 * \brief Wrap for PyList_Append, with decrease reference counting after append.
 
176
/** Wrap for PyList_Append, with decrease reference counting after append.
145
177
 */
146
178
void pcilib_pylist_append(pcilib_py_object* list, pcilib_py_object* value);
147
179
#ifdef __cplusplus