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

Function emit_method

internal/cbm/iris_export_xml.c:170–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170static void emit_method(UdlBuf *b, const char *ms, const char *me) {
171 char mn[MAX_NAME];
172 extract_attr(ms, me, "name", mn, sizeof(mn));
173 if (!mn[0])
174 return;
175 bool cm = tag_is_one(ms, me, "ClassMethod");
176 char formal[1024] = "";
177 elem_content(ms, me, "FormalSpec", formal, sizeof(formal));
178 char ret[MAX_NAME] = "";
179 elem_content(ms, me, "ReturnType", ret, sizeof(ret));
180 char desc[4096] = "";
181 elem_content(ms, me, "Description", desc, sizeof(desc));
182 if (desc[0]) {
183 ub_app(b, "/// ");
184 for (char *c = desc; *c; c++) {
185 if (*c == '\n')
186 ub_app(b, "\n/// ");
187 else {
188 char t[2] = {*c, 0};
189 ub_app(b, t);
190 }
191 }
192 ub_app(b, "\n");
193 }
194 ub_app(b, cm ? "ClassMethod " : "Method ");
195 ub_app(b, mn);
196 ub_app(b, "(");
197 ub_app(b, formal);
198 ub_app(b, ")");
199 if (ret[0]) {
200 ub_app(b, " As ");
201 ub_app(b, ret);
202 }
203 ub_app(b, "\n{\n");
204 char impl[1024 * 32] = "";
205 elem_content(ms, me, "Implementation", impl, sizeof(impl));
206 ub_app(b, impl);
207 ub_app(b, "}\n\n");
208}
209
210static void emit_property(UdlBuf *b, const char *ps, const char *pe) {
211 char pn[MAX_NAME];

Callers 1

transcode_classFunction · 0.85

Calls 4

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

Tested by

no test coverage detected