Cantera  3.2.0a2
Loading...
Searching...
No Matches
ctrxn.h
Go to the documentation of this file.
1/**
2 * CTRXN - Generated CLib %Cantera interface library.
3 *
4 * @file ctrxn.h
5 *
6 * Generated CLib API for %Cantera's Reaction class.
7 *
8 * This library of functions is designed to encapsulate %Cantera functionality
9 * and make it available for use in languages and applications other than C++.
10 * A set of library functions is provided that are declared "extern C". All
11 * %Cantera objects are stored and referenced by integers - no pointers are
12 * passed to or from the calling application.
13 *
14 * This file was generated by sourcegen. It will be re-generated by the
15 * %Cantera build process. Do not manually edit.
16 *
17 * @warning This library is an experimental part of the %Cantera API and
18 * may be changed without notice.
19 */
20
21// This file is part of Cantera. See License.txt in the top-level directory or
22// at https://cantera.org/license.txt for license and copyright information.
23
24#ifndef CTRXN_H
25#define CTRXN_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * @defgroup CAPIctrxn ctrxn Library
33 * Generated CLib API for %Cantera's Reaction class.
34 *
35 * @warning This library is an experimental part of the %Cantera API and
36 * may be changed or removed without notice.
37 *
38 * @ingroup CAPIindex
39 */
40
41 /**
42 * @addtogroup CAPIctrxn
43 * @{
44 */
45
46 /**
47 * Instantiate Reaction object using default constructor.
48 *
49 * Wraps C++ constructor: `undefined`
50 *
51 * @returns Object handle if successful and -1 for exception handling.
52 */
53 int32_t rxn_new();
54
55 /**
56 * The chemical equation for this reaction.
57 *
58 * Wraps C++ getter: `string Reaction::equation()`
59 *
60 * @param handle Handle to queried Reaction object.
61 * @param[in] bufLen Length of reserved array.
62 * @param[out] buf Returned string value.
63 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
64 */
65 int32_t rxn_equation(int32_t handle, int32_t bufLen, char* buf);
66
67 /**
68 * The type of reaction, including reaction rate information.
69 *
70 * Wraps C++ getter: `string Reaction::type()`
71 *
72 * @param handle Handle to queried Reaction object.
73 * @param[in] bufLen Length of reserved array.
74 * @param[out] buf Returned string value.
75 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
76 */
77 int32_t rxn_type(int32_t handle, int32_t bufLen, char* buf);
78
79 /**
80 * Check whether reaction involves third body collider.
81 *
82 * Wraps C++ getter: `bool Reaction::usesThirdBody()`
83 *
84 * @param handle Handle to queried Reaction object.
85 */
86 int32_t rxn_usesThirdBody(int32_t handle);
87
88 /**
89 * Get validity flag of reaction.
90 *
91 * Wraps C++ getter: `bool Reaction::valid()`
92 *
93 * @param handle Handle to queried Reaction object.
94 */
95 int32_t rxn_valid(int32_t handle);
96
97 /**
98 * An identification string for the reaction, used in some filtering operations.
99 *
100 * Wraps C++ variable-getter: `string Reaction::id`
101 *
102 * @param handle Handle to queried Reaction object.
103 * @param[in] bufLen Length of reserved array.
104 * @param[out] buf Returned string value.
105 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
106 */
107 int32_t rxn_id(int handle, int32_t bufLen, char* buf);
108
109 /**
110 * An identification string for the reaction, used in some filtering operations.
111 *
112 * Wraps C++ variable-setter: `string Reaction::id`
113 *
114 * @param handle Handle to queried Reaction object.
115 * @param[in] id An identification string for the reaction, used in some filtering operations.
116 */
117 int32_t rxn_setId(int32_t handle, const char* id);
118
119 /**
120 * True if reaction orders can be specified for non-reactant species.
121 *
122 * Wraps C++ variable-getter: `bool Reaction::allow_nonreactant_orders`
123 *
124 * @param handle Handle to queried Reaction object.
125 */
126 int32_t rxn_allowNonreactantOrders(int handle);
127
128 /**
129 * True if reaction orders can be specified for non-reactant species.
130 *
131 * Wraps C++ variable-setter: `bool Reaction::allow_nonreactant_orders`
132 *
133 * @param handle Handle to queried Reaction object.
134 * @param[in] allow_nonreactant_orders True if reaction orders can be specified for non-reactant species.
135 */
136 int32_t rxn_setAllowNonreactantOrders(int32_t handle, int32_t allow_nonreactant_orders);
137
138 /**
139 * Delete Reaction object.
140 *
141 * Wraps C++ destructor: `undefined`
142 *
143 * @param handle Handle to Reaction object.
144 * @returns Zero for success and -1 for exception handling.
145 */
146 int32_t rxn_del(int32_t handle);
147
148 /**
149 * Return size of Reaction storage.
150 *
151 * Wraps C++ reserved CLib function: `custom code`
152 *
153 * @returns Size or -1 for exception handling.
154 */
155 int32_t rxn_cabinetSize();
156
157 /**
158 * Return handle to parent of Reaction object.
159 *
160 * Wraps C++ reserved CLib function: `custom code`
161 *
162 * @param handle Handle to queried Reaction object.
163 * @returns Parent handle or -1 for exception handling.
164 */
165 int32_t rxn_parentHandle(int32_t handle);
166
167 /**
168 * @}
169 */
170
171#ifdef __cplusplus
172}
173#endif
174
175#endif // CTRXN_H
int32_t rxn_allowNonreactantOrders(int handle)
True if reaction orders can be specified for non-reactant species.
Definition ctrxn.cpp:116
int32_t rxn_id(int handle, int32_t bufLen, char *buf)
An identification string for the reaction, used in some filtering operations.
Definition ctrxn.cpp:93
int32_t rxn_del(int32_t handle)
Delete Reaction object.
Definition ctrxn.cpp:139
int32_t rxn_new()
Instantiate Reaction object using default constructor.
Definition ctrxn.cpp:37
int32_t rxn_parentHandle(int32_t handle)
Return handle to parent of Reaction object.
Definition ctrxn.cpp:162
int32_t rxn_setId(int32_t handle, const char *id)
An identification string for the reaction, used in some filtering operations.
Definition ctrxn.cpp:105
int32_t rxn_valid(int32_t handle)
Get validity flag of reaction.
Definition ctrxn.cpp:82
int32_t rxn_cabinetSize()
Return size of Reaction storage.
Definition ctrxn.cpp:150
int32_t rxn_type(int32_t handle, int32_t bufLen, char *buf)
The type of reaction, including reaction rate information.
Definition ctrxn.cpp:59
int32_t rxn_equation(int32_t handle, int32_t bufLen, char *buf)
The chemical equation for this reaction.
Definition ctrxn.cpp:47
int32_t rxn_usesThirdBody(int32_t handle)
Check whether reaction involves third body collider.
Definition ctrxn.cpp:71
int32_t rxn_setAllowNonreactantOrders(int32_t handle, int32_t allow_nonreactant_orders)
True if reaction orders can be specified for non-reactant species.
Definition ctrxn.cpp:127