MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / emit_header

Function emit_header

internal/cbm/iris_export_xml.c:137–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137static void emit_header(UdlBuf *b, const char *cs, const char *ce) {
138 char name[MAX_NAME];
139 extract_attr(cs, ce, "name", name, sizeof(name));
140 if (!name[0])
141 return;
142 ub_app(b, "Class ");
143 ub_app(b, name);
144 char sup[MAX_NAME * 4] = "";
145 elem_content(cs, ce, "Super", sup, sizeof(sup));
146 if (sup[0]) {
147 if (strchr(sup, ',')) {
148 ub_app(b, " Extends (");
149 ub_app(b, sup);
150 ub_app(b, ")");
151 } else {
152 ub_app(b, " Extends ");
153 ub_app(b, sup);
154 }
155 }
156 char pragma[64] = "";
157 if (tag_is_one(cs, ce, "Abstract"))
158 strncat(pragma, "Abstract,", sizeof(pragma) - strlen(pragma) - 1);
159 if (tag_is_one(cs, ce, "Final"))
160 strncat(pragma, "Final,", sizeof(pragma) - strlen(pragma) - 1);
161 if (pragma[0]) {
162 pragma[strlen(pragma) - 1] = '\0';
163 ub_app(b, " [ ");
164 ub_app(b, pragma);
165 ub_app(b, " ]");
166 }
167 ub_app(b, "\n{\n\n");
168}
169
170static void emit_method(UdlBuf *b, const char *ms, const char *me) {
171 char mn[MAX_NAME];

Callers 1

transcode_classFunction · 0.70

Calls 4

extract_attrFunction · 0.85
ub_appFunction · 0.85
elem_contentFunction · 0.85
tag_is_oneFunction · 0.85

Tested by

no test coverage detected