Gama C Library
Gama C API Documentation
Main Page
Data Structures
Files
Examples
File List
Globals
lib
gama
gmg.h
Go to the documentation of this file.
1
/**
2
* @file gmg.h
3
* @brief Provides a generic macro for generating debug string representations of Gama types.
4
*
5
* This header defines a convenient macro `gmg` that dispatches to type-specific
6
* formatting functions (e.g., `gmg_color`, `gmg_pos3`) to convert Gama data
7
* structures into human-readable strings for debugging purposes.
8
*/
9
#pragma once
10
11
/**
12
* @def gmg(type, obj)
13
* @brief Generic macro to get a string representation of a Gama type for debugging.
14
*
15
* This macro calls a type-specific formatting function (e.g., `gmg_color`,
16
* `gmg_pos3`) to convert a Gama object into a string. The actual formatting
17
* functions are typically defined in the respective type's header or in debug.h.
18
*
19
* @param type The base name of the type's formatting function (e.g., `color`, `pos3`).
20
* @param obj The object instance to convert to a string.
21
*/
22
#define gmg(type, obj) gmg_##type(obj)
Generated by
1.15.0