Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
mcr_Interface Struct Reference

#include <interface.h>

Public Attributes

size_t id
 
size_t data_size
 
struct mcr_contextcontext
 
struct mcr_IRegistryregistry
 
void *(* allocate )()
 
void(* deallocate )(void *)
 
mcr_data_fnc init
 
mcr_data_fnc deinit
 
mcr_compare_fnc compare
 
mcr_copy_fnc copy
 

Detailed Description

An interface describes an object of a specific type

Definition at line 34 of file interface.h.

Member Data Documentation

§ allocate

void*(* mcr_Interface::allocate) ()

Allocate data member to heap, default malloc

Definition at line 47 of file interface.h.

§ compare

mcr_compare_fnc mcr_Interface::compare

Compare two data members of this type. default memcmp

Definition at line 55 of file interface.h.

§ context

struct mcr_context* mcr_Interface::context

opt Libmacro context reference

Definition at line 42 of file interface.h.

§ copy

mcr_copy_fnc mcr_Interface::copy

Copy from source object to destination object, default memcpy

Definition at line 58 of file interface.h.

§ data_size

size_t mcr_Interface::data_size

Byte size of the data member for this type. If 0, allocate, deallocate, copy, and compare must be defined.

Definition at line 40 of file interface.h.

§ deallocate

void(* mcr_Interface::deallocate) (void *)

Deallocate from heap, default free

Definition at line 49 of file interface.h.

§ deinit

mcr_data_fnc mcr_Interface::deinit

Free object resources, default do nothing

Definition at line 53 of file interface.h.

§ id

size_t mcr_Interface::id

The unique identifier for this object type, -1 for unregistered types

Definition at line 37 of file interface.h.

§ init

mcr_data_fnc mcr_Interface::init

Initialize object resources, default zero all

Definition at line 51 of file interface.h.

§ registry

struct mcr_IRegistry* mcr_Interface::registry

opt The registry this interface is registered with.

Definition at line 44 of file interface.h.


The documentation for this struct was generated from the following file: