design_pattern_for_c  V 1.00
chain_element.h
Go to the documentation of this file.
1 
5 #ifndef CHAIN_ELEMENT_H_
6 #define CHAIN_ELEMENT_H_
8 
9 /* @{ */
10 #define COR_SUCCESS (0)
11 #define COR_FAILED (-1)
12 /* @} */
13 
17 struct chain_element_t;
19 
22  void *ctx;
23 };
25 
29 };
31 
33 ChainElement chain_element_new(int is_threadsafe);
37 void chain_element_call(ChainElement this, void *arg);
39 #endif
ChainElementPart result_element_part
Definition: chain_element.h:28
int chain_element_add_function(ChainElement this, chain_element_req_t *elemnt_data)
Definition: chain_element.c:73
void chain_element_call(ChainElement this, void *arg)
This is API for Chain of Responsibility design pettern class.
cor_result_e(* chain_func)(void *arg, void *ctx)
chain func
chain function element part class instance definition
chain_element_data_t element_data
Definition: chain_element.h:27
void chain_element_remove_element_part(ChainElement this, ChainElementPart element)
void chain_element_remove_function(ChainElement this, chain_func func)
Definition: chain_element.c:86
void chain_element_delete(ChainElement this)
struct chain_element_t * ChainElement
Definition: chain_element.h:18
ChainElement chain_element_new(int is_threadsafe)
Definition: chain_element.c:57