Browse Source

Commenting IF default flags and stuffs

Yann Weber 4 years ago
parent
commit
a69926bd39
2 changed files with 46 additions and 14 deletions
  1. 7
    2
      rpn_if.h
  2. 39
    12
      rpn_if_default.h

+ 7
- 2
rpn_if.h View File

@@ -23,6 +23,13 @@
23 23
 
24 24
 #include "rpn_jit.h"
25 25
 
26
+/**@file rpn_if.h
27
+ * @ingroup ifs_if
28
+ * @brief Iterated functions headers
29
+ *
30
+ * Iterated functions structure + API definition
31
+ */
32
+
26 33
 /**@defgroup ifs_if Iterated function
27 34
  * @ingroup ifs
28 35
  * @brief Iterated RPN expression
@@ -95,8 +102,6 @@ struct rpn_if_s
95 102
  * @param rpn list of RPN expresions of params->rpn_sz size
96 103
  * @param memmap A suitable memory map. If NULL given, a new mmap is used
97 104
  * @return A pointer on an allocated @ref rpn_if_s
98
- * @todo Delete rpn argument : rpn expressions are initialized and
99
- * have to be compiled later
100 105
  */
101 106
 rpn_if_t* rpn_if_new(const rpn_if_param_t *params, rpn_value_t *memmap);
102 107
 

+ 39
- 12
rpn_if_default.h View File

@@ -21,6 +21,7 @@
21 21
 
22 22
 /**@file rpn_if_default.h Defines default IF
23 23
  * @ingroup ifs_if_default
24
+ * @ingroup ifs_if
24 25
  * @brief Default IF definitions
25 26
  */
26 27
 
@@ -35,21 +36,30 @@
35 36
 #include "config.h"
36 37
 #include "rpn_if.h"
37 38
 
38
-#define RPN_IF_POSITION_LINEAR 0 // One expr for position
39
-#define RPN_IF_POSITION_XY 1 // two expr for poisition
40
-#define RPN_IF_POSITION_XDIM 2 // X expr for position
39
+/**@weakgroup ifs_if_default_posflag Default IF position flags
40
+ * @ingroup ifs_if_default
41
+ * @{ */
42
+#define RPN_IF_POSITION_LINEAR 0 ///< One expr for position
43
+#define RPN_IF_POSITION_XY 1 ///< two expr for position
44
+#define RPN_IF_POSITION_XDIM 2 ///< X expr for position
41 45
 
42
-#define RPN_IF_POSITION_OF_LOOP 0 // Loop on position overflow
43
-#define RPN_IF_POSITION_OF_ERR 16 // Trigger error on position overflow
46
+#define RPN_IF_POSITION_OF_LOOP 0 ///< Loop on position overflow
47
+#define RPN_IF_POSITION_OF_ERR 16 ///< Trigger error on position overflow
48
+/**@}*/
44 49
 
45
-#define RPN_IF_RES_BOOL 0 // Set to one when position occurs
46
-#define RPN_IF_RES_CONST 1 // Set to a constant value
47
-#define RPN_IF_RES_CONST_RGBA 2 // Set to a constant RGB using alpha channel
48
-#define RPN_IF_RES_COUNT 3 // Count number of time position occurs
49
-#define RPN_IF_RES_XFUN 4 // Set to result of rpn_expr
50
-#define RPN_IF_RES_RGB 5 // Set result to RGB color from rpn_expr
51
-#define RPN_IF_RES_RGBA 6 // Set result to RGB using alpha channel from rpn_expr
50
+/**@weakgroup ifs_if_default_resflag Default IF position flags
51
+ * @ingroup ifs_if_default
52
+ * @{ */
53
+#define RPN_IF_RES_BOOL 0 ///< Set to one when position occurs
54
+#define RPN_IF_RES_CONST 1 ///< Set to a constant value
55
+#define RPN_IF_RES_CONST_RGBA 2 ///< Set to a constant RGB using alpha channel
56
+#define RPN_IF_RES_COUNT 3 ///< Count number of time position occurs
57
+#define RPN_IF_RES_XFUN 4 ///< Set to result of rpn_expr
58
+#define RPN_IF_RES_RGB 5 ///< Set result to RGB color from rpn_expr
59
+#define RPN_IF_RES_RGBA 6 ///< Set result to RGB using alpha channel from rpn_expr
60
+/**@}*/
52 61
 
62
+/**@brief Alias for struct @ref rpn_if_default_data_s */
53 63
 typedef struct rpn_if_default_data_s rpn_if_default_data_t;
54 64
 
55 65
 /**@brief Stores default IF data
@@ -58,7 +68,9 @@ typedef struct rpn_if_default_data_s rpn_if_default_data_t;
58 68
  */
59 69
 struct rpn_if_default_data_s
60 70
 {
71
+	/**@brief Flag defining position coordinate handling */
61 72
 	short pos_flag;
73
+	/**@brief Flag defining result handling */
62 74
 	short res_flag;
63 75
 	/**@brief Stores size limits given pos_flag
64 76
 	 *
@@ -76,7 +88,22 @@ struct rpn_if_default_data_s
76 88
 	rpn_value_t *const_val;
77 89
 };
78 90
 
91
+/**@brief Create a new @ref rpn_if_s corresponding to given flags
92
+ * @ingroup ifs_if_default
93
+ *
94
+ * @param pos_flag Binary OR combination of RPN_IF_POSITION_*
95
+ *     (@ref ifs_if_default_posflag )
96
+ * @param pos_flag Binary OR combination of RPN_IF_RES_*
97
+ *     (@ref ifs_if_default_posflag )
98
+ * @returns A new @ref rpn_if_t (see @ref rpn_if_new ) or NULL on
99
+ * error
100
+ * @todo Implementation/testing
101
+ */
102
+rpn_if_t* rpn_if_new_default(short pos_flag, short res_flag);
103
+
104
+/**@brief Default argf function ( see @ref rpn_if_param_s.arg_f ) */
79 105
 int rpn_if_argf_default(rpn_if_t *rif, size_t pos, rpn_value_t *args);
106
+/**@brief Default result function ( see @ref rpn_if_param_s.res_f ) */
80 107
 int rpn_if_resf_default(rpn_if_t *rif, size_t *pos, rpn_value_t *data);
81 108
 
82 109
 /**@brief Set the first expression argument from position

Loading…
Cancel
Save