Source

glLoadGen / modules / StructNoloadCpp.lua

local struct = require "Structure"


local ext_variables = 
{ type="group",
	{ type="write", name="LargeHeader(hFile, value, options)", value="Extension Variables", },
	{ type="block", name="ExtVariables(hFile, spec, options)",
		{ type="ext-iter",
			{ type="write", name="ExtVariable(hFile, extName, spec, options)", },
		},
	},
}

local func_variables =
{ type="group",
{ type="func-seen",
	{ type="ext-iter",
		{type="func-iter",
			{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %extName", first=true},
			{ type="write", name="Function(hFile, func, typemap, spec, options, funcSeen)", },
			{ type="blank", last=true },
		},
	},
	{ type="version-iter",
		{ type="core-ext-cull-iter",
			{type="func-iter",
				{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %extName", first=true},
				{ type="write", name="Function(hFile, func, typemap, spec, options, funcSeen)", },
				{ type="blank", last=true },
			},
		},
		{type="func-iter",
			{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %version", first=true},
			{ type="write", name="Function(hFile, func, typemap, spec, options, funcSeen)", },
			{ type="blank", last=true },
		},
	},
},
}

local sys_functions =
{ type="block", name="System(hFile, spec, options)",
	{type="write", name="SetupFunction(hFile, specData, spec, options)", },
	{type="blank", cond="version-iter" },
	{type="write", name="VersionFunctions(hFile, specData, spec, options)", cond="version-iter"},
}


local my_struct =
{
	{ type="file", style="hdr", name="GetFilename(basename, spec, options)",
		{ type="block", name="IncludeGuard",
			{ type="blank"},
			{ type="write", name="Guards(hFile, spec, options)",},
			{ type="blank"},
			{ type="write", name="Typedefs(hFile, specData, spec, options)",},
			{ type="blank"},
			
			{ type="block", name="MainNamespace(hFile, spec, options)",
				ext_variables,
				{ type="blank"},
				{ type="block", name="Enumerators(hFile, spec, options)",
					{ type="enum-seen",
						{ type="ext-iter",
							{type="enum-iter",
								{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %extName", first=true},
								{ type="write", name="Enumerator(hFile, enum, enumTable, spec, options, enumSeen)", },
								{ type="blank", last=true },
							},
						},
						{ type="version-iter",
							{ type="core-ext-cull-iter",
								{type="enum-iter",
									{ type="write", name="SmallHeader(hFile, value, options)", value="Core Extension: %extName", first=true},
									{ type="write", name="Enumerator(hFile, enum, enumTable, spec, options, enumSeen)", },
									{ type="blank", last=true },
								},
							},
							{type="enum-iter",
								{ type="write", name="SmallHeader(hFile, value, options)", value="Version: %version", first=true},
								{ type="write", name="Enumerator(hFile, enum, enumTable, spec, options, enumSeen)", },
								{ type="blank", last=true },
							},
						},
					},
				},
				{ type="blank"},
				func_variables,
				sys_functions,
			},
		},
	},
	
	{ type="file", style="src", name="GetFilename(basename, spec, options)",
		{ type="write", name="Includes(hFile, basename, spec, options)", },
		{ type="blank"},
		{ type="write", name="LoaderFunc(hFile, spec, options)", },
		{ type="blank"},
		{ type="block", name="MainNamespace(hFile, spec, options)",
			ext_variables,
			{ type="blank"},
			{ type="group", style="typedefs",
				func_variables,
			},
			{ type="blank"},
			{ type="group", style="defs",
				func_variables,
			},
			{ type="blank"},
			{ type="group", style="switch",
				func_variables,
			},
			{ type="blank"},
			{ type="block", name="Struct(hFile, spec, options)", style="init",
				func_variables,
			},
			{ type="blank"},
			sys_functions,
		},
	},
}

my_struct = struct.BuildStructure(my_struct)
return my_struct
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.