comparison mde/Options.d @ 62:960206198cbd

Documentation changes only. (Idea for new gui.content.Items module; unused gl.texture module commented out.)
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 27 Jun 2008 17:19:46 +0100
parents f000d6cd0f74
children
comparison
equal deleted inserted replaced
61:7cab2af4ba21 62:960206198cbd
297 template optClassAdd(char[] symb) { 297 template optClassAdd(char[] symb) {
298 const char[] optClassAdd = symb ~ "=new "~classinfo(this).name~";\n";//Options.addOptionsClass("~symb~", );\n"; 298 const char[] optClassAdd = symb ~ "=new "~classinfo(this).name~";\n";//Options.addOptionsClass("~symb~", );\n";
299 }+/ 299 }+/
300 /** mixin impl("type symbol[, symbol[...]];[type symbol[...];][...]") 300 /** mixin impl("type symbol[, symbol[...]];[type symbol[...];][...]")
301 * 301 *
302 * E.g. 302 * Where type is one of bool, int, double, char[]. E.g.
303 * --- 303 * ---
304 * mixin (impl ("bool a, b; int i;")); 304 * mixin (impl ("bool a, b; int i;"));
305 * --- 305 * ---
306 * 306 *
307 * In case this() needs to be customized, mixin(impl!(A)) is equivalent to: 307 * In case this() needs to be customized, mixin(impl!(A)) is equivalent to:
314 * 314 *
315 * In general errors aren't reported well. Trial with pragma (msg, impl!(...)); if 315 * In general errors aren't reported well. Trial with pragma (msg, impl!(...)); if
316 * necessary. 316 * necessary.
317 * 317 *
318 * Extending: mixins could also be used for the static this() {...} or even the whole 318 * Extending: mixins could also be used for the static this() {...} or even the whole
319 * class, but doing would rather decrease readability of any implementation. */ 319 * class, but doing so would rather decrease readability of any implementation. */
320 template impl(char[] A /+, char[] symb+/) { 320 template impl(char[] A /+, char[] symb+/) {
321 const char[] impl = A~"\nthis(){\n"~aaDefs!(A)~"}"; 321 const char[] impl = A~"\nthis(){\n"~aaDefs!(A)~"}";
322 // ~"\nstatic this(){\n"~optClassAdd!(symb)~"}" 322 // ~"\nstatic this(){\n"~optClassAdd!(symb)~"}"
323 } 323 }
324 } 324 }