design_pattern_for_c
V 1.00
|
Implement of prototype_factory API, defined in prototype_factory.h. More...
Go to the source code of this file.
Data Structures | |
struct | prototype_factory_instance_t |
prototype_factory_instance, PrototypeFactory class instance definition More... | |
Macros | |
#define | PROT_FACT_DEFAULT_METHOD(key) prototype_default_ ## key |
define to set default More... | |
#define | PROT_FACT_SET_METHOD(this, factory_method, key) |
define to set method More... | |
Functions | |
static void * | prototype_default_clone (void *base, size_t base_length) |
clone More... | |
static void | prototype_default_free (void *clone_base) |
free More... | |
static void | prototype_default_free_base (void *base) |
free base More... | |
PrototypeFactoryInstance | prototype_factory_instance_new (void *base, size_t base_length, prototype_factory_method_t *factory_method) |
new More... | |
void | prototype_factory_instance_free (PrototypeFactoryInstance this) |
free More... | |
void * | prototype_factory_instance_clone_data (PrototypeFactoryInstance this) |
clone data More... | |
void | prototype_factory_instance_free_data (PrototypeFactoryInstance this, void *data) |
free data More... | |
Implement of prototype_factory API, defined in prototype_factory.h.
Definition in file prototype_factory.c.
#define PROT_FACT_DEFAULT_METHOD | ( | key | ) | prototype_default_ ## key |
define to set default
Definition at line 27 of file prototype_factory.c.
#define PROT_FACT_SET_METHOD | ( | this, | |
factory_method, | |||
key | |||
) |
define to set method
Definition at line 29 of file prototype_factory.c.
|
static |
clone
Definition at line 35 of file prototype_factory.c.
|
static |
free
Definition at line 44 of file prototype_factory.c.
|
static |
free base
Definition at line 48 of file prototype_factory.c.
void* prototype_factory_instance_clone_data | ( | PrototypeFactoryInstance | this | ) |
clone data
Definition at line 77 of file prototype_factory.c.
void prototype_factory_instance_free | ( | PrototypeFactoryInstance | this | ) |
void prototype_factory_instance_free_data | ( | PrototypeFactoryInstance | this, |
void * | data | ||
) |
free data
Definition at line 82 of file prototype_factory.c.
PrototypeFactoryInstance prototype_factory_instance_new | ( | void * | base, |
size_t | base_length, | ||
prototype_factory_method_t * | factory_method | ||
) |