PengZheng commented on code in PR #692:
URL: https://github.com/apache/celix/pull/692#discussion_r1413567641


##########
libs/utils/include/celix_filter.h:
##########
@@ -44,63 +89,121 @@ typedef enum celix_filter_operand_enum
     CELIX_FILTER_OPERAND_NOT,
 } celix_filter_operand_t;
 
+/**
+ * @brief Internal opaque struct for internal use only.
+ */
+typedef struct celix_filter_internal celix_filter_internal_t; // opaque struct 
for internal use only
 
-typedef struct celix_filter_internal celix_filter_internal_t; //opaque struct 
for internal use only
-
-typedef struct celix_filter_struct celix_filter_t;
-
-struct celix_filter_struct {
-    celix_filter_operand_t operand;
-    const char *attribute; //NULL for operands AND, OR ot NOT
-    const char *value; //NULL for operands AND, OR or NOT NOT
-    const char *filterStr;
+/**
+ * @brief The Apache Celix filter struct.
+ */
+typedef struct celix_filter_struct {
+    celix_filter_operand_t operand; /**< The filter operand. */
+    const char* attribute;          /**< The filter attribute; NULL for 
operands `AND`, `OR` or `NOT`. */
+    const char* value;              /**< The filter value; NULL for operands 
`AND`, `OR` or `NOT`. */
+    const char* filterStr;          /**< The filter string representation. */
 
-    //type is celix_filter_t* for AND, OR and NOT operator and char* for 
SUBSTRING
-    //for other operands children is NULL
-    celix_array_list_t *children;
+    celix_array_list_t* children; /**< The filter children; only valid if the 
operand is not `AND`, `OR` or `NOT` else

Review Comment:
   It seems that they (`children`, `attribute` and `value`) can form something 
like typed union.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to