name
const char* name(var type);
Return the name of a given type
.
brief
const char* brief(var type);
Return a brief description of a given type
.
description
const char* description(var type);
Return a longer description of a given type
.
definition
const char* definition(var type);
Return the C definition of a given type
.
Usage
show($S(name(Int))); /* Int */
show($S(brief(Int))); /* Integer Object */
Provides Documentation
The Doc
class can be used to give documentation to a certain class or type. This documentation can then be accessed using the help
function or by other tools used to generate documentation such as for the Cello website. Documentation can be written in Markdown.
The examples
and methods
entries should be provided as NULL
terminated arrays allocated statically.
struct Example {
const char* name;
const char* body;
};
struct Method {
const char* name;
const char* definition;
const char* description;
};
struct Doc {
const char* (*name)(void);
const char* (*brief)(void);
const char* (*description)(void);
const char* (*definition)(void);
struct Example* (*examples)(void);
struct Method* (*methods)(void);
};