cmEngine  0.1.1
A library for interpreting CMake code.
Data Fields
cmFunction Struct Reference

#include <cmFunction.h>

Data Fields

void * data
 
void(* call )(void *data, struct cmFunctionContext *function_context)
 
void *(* copy )(struct cmHost *host, const void *data)
 
void(* release )(struct cmHost *host, void *data)
 

Detailed Description

This structure is used to contain a function callable from the cmake interpreter.

Examples:
echoCommand.c.

Field Documentation

§ call

void(* cmFunction::call) (void *data, struct cmFunctionContext *function_context)

Calls the function. Issuing an error message will be interpreted as a failed function call. Issue error messages instead of relying on error codes.

Examples:
echoCommand.c.

§ copy

void*(* cmFunction::copy) (struct cmHost *host, const void *data)

Makes a copy of the function data. A null-pointer returned by this function indicates a memory allocation failure.

§ data

void* cmFunction::data

Custom data to be passed to the function.

§ release

void(* cmFunction::release) (struct cmHost *host, void *data)

Releases memory allocated by the function. This happens when the function goes out of scope.


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