56 int *
id = (
int *)input_parameter;
64 int *
id = (
int *)input_parameter;
67 return instance->id == *id;
ChainElementPart class instance definition, which is a part of chain.
static void chain_of_resp_new(void *this, size_t size, void *input_parameter)
new API
void flyweight_factory_free(FlyweightFactory this)
clear class handle
This is API as Flyweight design petten.
struct chain_of_resp_t * ChainOfResponsibility
void * flyweight_get(FlyweightFactory this, void *constructor_parameter)
getter
static int chain_of_resp_equall_operand(void *this, size_t size, void *input_parameter)
equall operand, check name
ChainElementPart result_element_part
void chain_element_remove_function(ChainElement this, chain_func func)
void cor_set_threadsafe(int is_threadsafe)
set thredsafe
void chain_element_delete(ChainElement this)
ChainElement chain_element_new(int is_threadsafe)
int flyweight_set(FlyweightFactory this, void *constructor_parameter, void *data, int(*setter)(void *this, size_t size, void *input_parameter))
setter
FlyweightFactory member definition, defined in flyweight.c.
This is API for Chain of Responsibility design pettern class.
int chain_element_add_function(ChainElement this, chain_element_req_t *elemnt_data)
ChainElementPart cor_add_function(const int id, chain_func func, void *ctx)
add to chain api
void cor_remove_chain_element_part(const int id, ChainElementPart element)
remove to chain api
void chain_element_call(ChainElement this, void *arg)
cor_result_e(* chain_func)(void *arg, void *ctx)
chain func
void(* constructor)(void *this, size_t size, void *input_parameter)
constructor of class
ChainOfResponsibility class instance definition.
FlyweightFactory flyweight_factory_new(size_t class_size, int is_threadsafe, FlyweightMethodsIF methods)
define class for flyweight
void cor_remove_function(const int id, chain_func func)
remove to chain api
static int chain_of_resp_setter(void *this, size_t size, void *input_parameter)
setter, add function to ChainElement
flyweight_methods_t method
This is API for element of chain.
static void chain_of_resp_free(void *this)
free member resource
chain function element part class instance definition
void cor_clear(void)
clear all list
management parameter of this class API, to use flyweight
void chain_element_remove_element_part(ChainElement this, ChainElementPart element)
void cor_call(const int id, void *arg)
call chain api
Flyweight methods interface definition, to set flyweight_factory_new.
struct chain_of_resp_mng_t cor_mng_g