Files
c-prime/application/demos/example.opengl/classConfiguration.c

1530 lines
36 KiB
C
Raw Normal View History

2025-11-17 10:28:09 +01:00
#include <classConfiguration.h>
char * __ClassNames[TOTAL_CLASS_COUNT] = { "opengl", "event", "keyboard", "screen", "mouse", "vector2", "vector", "int", "quadMesh", "element", "vector4", "windowManager", "Hints", "resourceManager", "texture2D", "tesselation", "mesh", "unsignedIntegerArray", "floatArray", "program", "shader", "attribute", "sampler2D", "vector3", "array", "text", "char", "fileSystem", "consoleManager", "http", "headerManager", "header", "request", "cache", "file", "mimeTypes", "uniform", "member", "block", "fontRenderer", "renderPass", "compute2", "compute", "font", "quads", "pipeline", "eventManger", "vector_char_pointer", "vector_quadMesh", "vector_element", "vector_int", "vector_vector2" };
int __ClassMethodCount[TOTAL_CLASS_COUNT] = { 14, 0, 0, 0, 0, 6, 8, 2, 0, 14, 4, 2, 0, 1, 0, 3, 9, 11, 11, 14, 3, 0, 4, 4, 12, 12, 12, 8, 5, 7, 7, 0, 2, 3, 0, 3, 0, 0, 12, 3, 2, 2, 2, 3, 8, 2, 2, 8, 8, 8, 8, 8 };
int __ClassPropertyCount[TOTAL_CLASS_COUNT] = { 11, 3, 5, 2, 3, 2, 3, 0, 8, 14, 4, 4, 5, 0, 5, 4, 14, 3, 3, 6, 1, 3, 19, 3, 3, 4, 0, 0, 0, 9, 1, 2, 9, 1, 2, 2, 6, 7, 9, 1, 3, 2, 2, 4, 7, 3, 5, 3, 3, 3, 3, 3 };
char * __ClassPropertyNames[TOTAL_CLASS_COUNT][30] = {
{ "mainDisplay" , "mainWindow" , "MainScreen" , "RootWindow" , "lastTime" , "startTime" , "frameCount" , "testSampler" , "windowManager" , "eventManger" , "pipeline" },
{ "mouse" , "screen" , "keyboard" },
{ "keyCode" , "shiftKey" , "ctrlKey" , "altKey" , "metaKey" },
{ "size" , "position" },
{ "position" , "button" , "eventTypes" },
{ "x" , "y" },
{ "capacity" , "total" , "items" },
{ },
{ "position" , "size" , "color" , "zIndex" , "opacity" , "textureIndex" , "features" , "elementIndex" },
{ "index" , "position" , "size" , "backgroundColor" , "originalPosition" , "originalSize" , "originalBackgroundColor" , "opacity" , "backgroundImagePath" , "useBackgroundImage" , "features" , "featureNames" , "textureIndex" , "background" },
{ "x" , "y" , "z" , "w" },
{ "mainDisplay" , "mainWindow" , "MainScreen" , "RootWindow" },
{ "flags" , "functions" , "decorations" , "inputMode" , "status" },
{ },
{ "data" , "width" , "height" , "hasAlpha" , "offset" },
{ "program" , "mesh" , "font" , "samplerArray" },
{ "program" , "indices" , "textureCoordinates" , "vertexCoordinates" , "normalCoordinates" , "blocks" , "vertexArrayObject" , "uniformBuffer" , "indexBuffer" , "vertexbuffer" , "textureCoordinateBuffer" , "meshIndexBuffer" , "uvBuffer" , "uniformBuffers" },
{ "capacity" , "total" , "items" },
{ "capacity" , "total" , "items" },
{ "samplerIndex" , "uniforms" , "attributes" , "blocks" , "shaders" , "glProgram" },
{ "glShader" },
{ "name[64]" , "location" , "type" },
{ "texture" , "textures" , "glTexture" , "binded" , "filter" , "MIN_FILTER" , "MAG_FILTER" , "WRAP_S" , "WRAP_T" , "datatype" , "format" , "internalFormat" , "target" , "type" , "cubeSize" , "border" , "generateMipmap" , "UNPACK_ALIGNMENT" , "index" },
{ "x" , "y" , "z" },
{ "capacity" , "total" , "items" },
{ "value" , "usevalue" , "length" , "capacity" },
{ },
{ },
{ },
{ "socket" , "hostAddress" , "hostAddresslength" , "filesystem" , "mimetypes" , "headers" , "useSSL" , "sslContext" , "requestCallback" },
{ "headers" },
{ "name" , "value" },
{ "connection" , "address" , "port" , "url" , "method" , "version" , "mimeType" , "extension" , "headers" },
{ "files" },
{ "filePath" , "content" },
{ "extensions" , "mimeTypes" },
{ "name[64]" , "index" , "location" , "offset" , "size" , "type" },
{ "name" , "index" , "offset" , "size" , "type" , "arrayStride" , "topLevelSize" },
{ "members" , "buffer" , "index" , "bufferType" , "bufferSize" , "bindingPoint" , "name" , "data" , "autoUpload" },
{ "data" },
{ "enabled" , "shader" , "mesh" },
{ "program" , "active" },
{ "program" , "active" },
{ "program" , "mesh" , "font" , "samplerArray" },
{ "mesh" , "font" , "samplerArray" , "program" , "meshes" , "elements" , "mouseOverElements" },
{ "renderPasses" , "classIndices" , "methodIndices" },
{ "mainDisplay" , "mainWindow" , "RootWindow" , "lastEvent" , "lastMouseDownTime" },
{ "capacity" , "total" , "items" },
{ "capacity" , "total" , "items" },
{ "capacity" , "total" , "items" },
{ "capacity" , "total" , "items" },
{ "capacity" , "total" , "items" }
};
char * __ClassMethodNames[TOTAL_CLASS_COUNT][30] = {
{ "initialize" , "showExtensions" , "showVersion" , "setupTime" , "setupManagers" , "setupWindow" , "setupRenderLoop" , "setupPipeline" , "clockToMilliseconds" , "render" , "displayFPS" , "clear" , "clearColor" , "swapBuffers" },
{ },
{ },
{ },
{ },
{ "constructor" , "operator_plus" , "operator_add" , "add" , "subtract" , "length" },
{ "length" , "get" , "set" , "resize" , "add" , "delete" , "array_push" , "unshift" },
{ "toText" , "negative" },
{ },
{ "constructor" , "colorConverter" , "setOriginal" , "setter_size" , "setter_position" , "featureIsEnabled" , "getFeatureValueByFeatureName" , "updateFeature" , "setter_background" , "click" , "mousedown" , "mouseup" , "mouseover" , "mouseleave" },
{ "constructor" , "operator_plus" , "operator_add" , "add" },
{ "setupDisplay" , "setupWindow" },
{ },
{ "loadPngImage" },
{ },
{ "textFromNumber" , "prepare" , "render" },
{ "getUniformBlock" , "bindBlock" , "setProgram" , "getGLTypeSize" , "getComponentType" , "getItemSize" , "createBuffer" , "createBuffers" , "createOrderedTriangleStripQuad" },
{ "length" , "get" , "set" , "resize" , "addVector2" , "addVector3" , "add" , "delete" , "array_push" , "unshift" , "pop" },
{ "length" , "get" , "set" , "resize" , "addVector2" , "addVector3" , "add" , "delete" , "array_push" , "unshift" , "pop" },
{ "addShader" , "glGetProgramResourceiv" , "glGetProgramResourceName" , "extractBlocks" , "createNewBlock" , "getBlock" , "create" , "bindBlock" , "use" , "extractUniforms" , "extractAttributes" , "getAttributeByName" , "setUniform" , "updateSampler2D" },
{ "constructor" , "loadFromFile" , "checkShaderForErrors" },
{ },
{ "constructor" , "addTexture" , "getTextureIndex" , "bind" },
{ "constructor" , "operator_plus" , "operator_add" , "add" },
{ "length" , "data" , "get" , "set" , "resize" , "add" , "join" , "delete" , "array_push" , "unshift" , "pop" , "includes" },
{ "operator_compare" , "operator_add" , "constructor" , "get" , "resize" , "append" , "appendBinary" , "appendObject" , "concatenate" , "toNative" , "whiteSpace" , "free" },
{ "operator_compare" , "operator_add" , "operator_plus" , "compare" , "concatenate" , "includes" , "clone" , "copy" , "split" , "removeWhitespaceLeft" , "removeWhitespaceRight" , "removeWhitespace" },
{ "writeFile" , "readDir" , "readFile" , "readBinaryFile" , "ensureDirectory" , "makeDirectory" , "exists" , "isDirectory" },
{ "whiteSpace" , "logObject" , "log" , "error" , "createHorisontalLine" },
{ "createServer" , "initializeOpenSSL" , "listen" , "getExtension" , "logRequest" , "acceptConnection" , "dump_buffer" },
{ "parse" , "display" , "add" , "set" , "getHeaderIndex" , "getValue" , "get" },
{ },
{ "constructor" , "free" },
{ "getFile" , "addFile" , "getCachedFileByPath" },
{ },
{ "constructor" , "add" , "getByExtension" },
{ },
{ },
{ "add" , "enableAutoUpload" , "getBufferTypeText" , "createBuffer" , "upload" , "mapBufferError" , "getMemberArray" , "setMemberArrayRow" , "setMemberArray" , "setMemberItem" , "setData" , "setMember" },
{ "loadFont" , "draw_bitmap" , "show_image" },
{ "prepare" , "render" },
{ "prepare" , "render" },
{ "prepare" , "render" },
{ "textFromNumber" , "prepare" , "render" },
{ "textFromNumber" , "prepare" , "sortOpacity" , "createMeshes" , "updateMesh" , "callElementEvents" , "integerContains" , "render" },
{ "addRenderPass" , "render" },
{ "constructor" , "fetchEvent" },
{ "length" , "get" , "set" , "resize" , "add" , "delete" , "array_push" , "unshift" },
{ "length" , "get" , "set" , "resize" , "add" , "delete" , "array_push" , "unshift" },
{ "length" , "get" , "set" , "resize" , "add" , "delete" , "array_push" , "unshift" },
{ "length" , "get" , "set" , "resize" , "add" , "delete" , "array_push" , "unshift" },
{ "length" , "get" , "set" , "resize" , "add" , "delete" , "array_push" , "unshift" }
};
int __ClassPropertyOffsets[TOTAL_CLASS_COUNT][30] = {
{ offsetof( opengl, mainDisplay ) , offsetof( opengl, mainWindow ) , offsetof( opengl, MainScreen ) , offsetof( opengl, RootWindow ) , offsetof( opengl, lastTime ) , offsetof( opengl, startTime ) , offsetof( opengl, frameCount ) , offsetof( opengl, testSampler ) , offsetof( opengl, windowManager ) , offsetof( opengl, eventManger ) , offsetof( opengl, pipeline ) },
{ offsetof( event, mouse ) , offsetof( event, screen ) , offsetof( event, keyboard ) },
{ offsetof( keyboard, keyCode ) , offsetof( keyboard, shiftKey ) , offsetof( keyboard, ctrlKey ) , offsetof( keyboard, altKey ) , offsetof( keyboard, metaKey ) },
{ offsetof( screen, size ) , offsetof( screen, position ) },
{ offsetof( mouse, position ) , offsetof( mouse, button ) , offsetof( mouse, eventTypes ) },
{ offsetof( vector2, x ) , offsetof( vector2, y ) },
{ },
{ offsetof( quadMesh, position ) , offsetof( quadMesh, size ) , offsetof( quadMesh, color ) , offsetof( quadMesh, zIndex ) , offsetof( quadMesh, opacity ) , offsetof( quadMesh, textureIndex ) , offsetof( quadMesh, features ) , offsetof( quadMesh, elementIndex ) },
{ offsetof( element, index ) , offsetof( element, position ) , offsetof( element, size ) , offsetof( element, backgroundColor ) , offsetof( element, originalPosition ) , offsetof( element, originalSize ) , offsetof( element, originalBackgroundColor ) , offsetof( element, opacity ) , offsetof( element, backgroundImagePath ) , offsetof( element, useBackgroundImage ) , offsetof( element, features ) , offsetof( element, featureNames ) , offsetof( element, textureIndex ) , offsetof( element, background ) },
{ offsetof( vector4, x ) , offsetof( vector4, y ) , offsetof( vector4, z ) , offsetof( vector4, w ) },
{ offsetof( windowManager, mainDisplay ) , offsetof( windowManager, mainWindow ) , offsetof( windowManager, MainScreen ) , offsetof( windowManager, RootWindow ) },
{ offsetof( Hints, flags ) , offsetof( Hints, functions ) , offsetof( Hints, decorations ) , offsetof( Hints, inputMode ) , offsetof( Hints, status ) },
{ },
{ offsetof( texture2D, data ) , offsetof( texture2D, width ) , offsetof( texture2D, height ) , offsetof( texture2D, hasAlpha ) , offsetof( texture2D, offset ) },
{ offsetof( tesselation, program ) , offsetof( tesselation, mesh ) , offsetof( tesselation, font ) , offsetof( tesselation, samplerArray ) },
{ offsetof( mesh, program ) , offsetof( mesh, indices ) , offsetof( mesh, textureCoordinates ) , offsetof( mesh, vertexCoordinates ) , offsetof( mesh, normalCoordinates ) , offsetof( mesh, blocks ) , offsetof( mesh, vertexArrayObject ) , offsetof( mesh, uniformBuffer ) , offsetof( mesh, indexBuffer ) , offsetof( mesh, vertexbuffer ) , offsetof( mesh, textureCoordinateBuffer ) , offsetof( mesh, meshIndexBuffer ) , offsetof( mesh, uvBuffer ) , offsetof( mesh, uniformBuffers ) },
{ offsetof( unsignedIntegerArray, capacity ) , offsetof( unsignedIntegerArray, total ) , offsetof( unsignedIntegerArray, items ) },
{ offsetof( floatArray, capacity ) , offsetof( floatArray, total ) , offsetof( floatArray, items ) },
{ offsetof( program, samplerIndex ) , offsetof( program, uniforms ) , offsetof( program, attributes ) , offsetof( program, blocks ) , offsetof( program, shaders ) , offsetof( program, glProgram ) },
{ offsetof( shader, glShader ) },
{ offsetof( attribute, name[64] ) , offsetof( attribute, location ) , offsetof( attribute, type ) },
{ offsetof( sampler2D, texture ) , offsetof( sampler2D, textures ) , offsetof( sampler2D, glTexture ) , offsetof( sampler2D, binded ) , offsetof( sampler2D, filter ) , offsetof( sampler2D, MIN_FILTER ) , offsetof( sampler2D, MAG_FILTER ) , offsetof( sampler2D, WRAP_S ) , offsetof( sampler2D, WRAP_T ) , offsetof( sampler2D, datatype ) , offsetof( sampler2D, format ) , offsetof( sampler2D, internalFormat ) , offsetof( sampler2D, target ) , offsetof( sampler2D, type ) , offsetof( sampler2D, cubeSize ) , offsetof( sampler2D, border ) , offsetof( sampler2D, generateMipmap ) , offsetof( sampler2D, UNPACK_ALIGNMENT ) , offsetof( sampler2D, index ) },
{ offsetof( vector3, x ) , offsetof( vector3, y ) , offsetof( vector3, z ) },
{ offsetof( array, capacity ) , offsetof( array, total ) , offsetof( array, items ) },
{ offsetof( text, value ) , offsetof( text, usevalue ) , offsetof( text, length ) , offsetof( text, capacity ) },
{ },
{ },
{ },
{ offsetof( http, socket ) , offsetof( http, hostAddress ) , offsetof( http, hostAddresslength ) , offsetof( http, filesystem ) , offsetof( http, mimetypes ) , offsetof( http, headers ) , offsetof( http, useSSL ) , offsetof( http, sslContext ) },
{ offsetof( headerManager, headers ) },
{ offsetof( header, name ) , offsetof( header, value ) },
{ offsetof( request, connection ) , offsetof( request, address ) , offsetof( request, port ) , offsetof( request, url ) , offsetof( request, method ) , offsetof( request, version ) , offsetof( request, mimeType ) , offsetof( request, extension ) , offsetof( request, headers ) },
{ offsetof( cache, files ) },
{ offsetof( file, filePath ) , offsetof( file, content ) },
{ offsetof( mimeTypes, extensions ) , offsetof( mimeTypes, mimeTypes ) },
{ offsetof( uniform, name[64] ) , offsetof( uniform, index ) , offsetof( uniform, location ) , offsetof( uniform, offset ) , offsetof( uniform, size ) , offsetof( uniform, type ) },
{ offsetof( member, name ) , offsetof( member, index ) , offsetof( member, offset ) , offsetof( member, size ) , offsetof( member, type ) , offsetof( member, arrayStride ) , offsetof( member, topLevelSize ) },
{ offsetof( block, members ) , offsetof( block, buffer ) , offsetof( block, index ) , offsetof( block, bufferType ) , offsetof( block, bufferSize ) , offsetof( block, bindingPoint ) , offsetof( block, name ) , offsetof( block, data ) , offsetof( block, autoUpload ) },
{ offsetof( fontRenderer, data ) },
{ offsetof( renderPass, enabled ) , offsetof( renderPass, shader ) , offsetof( renderPass, mesh ) },
{ offsetof( compute2, program ) , offsetof( compute2, active ) },
{ offsetof( compute, program ) , offsetof( compute, active ) },
{ offsetof( font, program ) , offsetof( font, mesh ) , offsetof( font, font ) , offsetof( font, samplerArray ) },
{ offsetof( quads, mesh ) , offsetof( quads, font ) , offsetof( quads, samplerArray ) , offsetof( quads, program ) , offsetof( quads, meshes ) , offsetof( quads, elements ) , offsetof( quads, mouseOverElements ) },
{ offsetof( pipeline, renderPasses ) , offsetof( pipeline, classIndices ) , offsetof( pipeline, methodIndices ) },
{ offsetof( eventManger, mainDisplay ) , offsetof( eventManger, mainWindow ) , offsetof( eventManger, RootWindow ) , offsetof( eventManger, lastEvent ) , offsetof( eventManger, lastMouseDownTime ) }
};
int __ClassPropertyDatatypeIndices[TOTAL_CLASS_COUNT][30] = {
{1 , 1 , -5 , 1 , -5 , 1 , -5 , 22 , 11 , 46 , 45 },
{4 , 3 , 2 },
{-5 , 1 , 1 , 1 , 1 },
{5 , 5 },
{5 , -5 , 6 },
{1 , 1 },
{-5 , -5 , 1 },
{ },
{5 , 5 , 23 , 1 , 1 , -5 , -5 , -5 },
{-5 , 23 , 5 , 23 , 23 , 5 , 23 , 1 , -3 , 1 , -5 , 6 , -5 , 1 },
{1 , 1 , 1 , 1 },
{1 , 1 , -5 , 1 },
{-6 , -6 , -6 , -6 , -6 },
{ },
{1 , -5 , -5 , -5 , 5 },
{19 , 16 , 39 , 22 },
{19 , 17 , 18 , 18 , 18 , 24 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 17 },
{-5 , -5 , -5 },
{-5 , -5 , 1 },
{1 , 24 , 24 , 24 , 24 , 1 },
{1 },
{1 , 1 , 1 },
{14 , 24 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 23 , 1 , 1 , 1 , 1 },
{1 , 1 , 1 },
{-5 , -5 , 1 },
{-3 , -5 , -5 , -5 },
{ },
{ },
{ },
{-5 , 1 , -5 , 27 , 35 , 30 , -5 , 1 , 1 },
{24 },
{-3 , -3 },
{-3 , -3 , -5 , -3 , -3 , -3 , -3 , -3 , 30 },
{24 },
{-3 , 25 },
{24 , 24 },
{-2 , 1 , 1 , 1 , 1 , 1 },
{-3 , 1 , 1 , 1 , 1 , 1 , 1 },
{24 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 },
{1 },
{1 , 20 , 16 },
{19 , -5 },
{19 , -5 },
{19 , 16 , 39 , 22 },
{16 , 39 , 22 , 19 , 6 , 6 , 6 },
{24 , 6 , 6 },
{1 , 1 , 1 , 1 , 1 },
{-5 , -5 , 1 },
{-5 , -5 , 8 },
{-5 , -5 , 9 },
{-5 , -5 , -5 },
{-5 , -5 , 5 }
};
void getArrayByClassIndex( int size, void * * voidArray, int * structByteSize, int classIndex ) {
switch( classIndex ) {
case 0:
voidArray = ( void ** ) ( struct opengl * ) malloc( sizeof( struct opengl ) * size );
*structByteSize = sizeof( struct opengl );
break;
case 1:
voidArray = ( void ** ) ( struct event * ) malloc( sizeof( struct event ) * size );
*structByteSize = sizeof( struct event );
break;
case 2:
voidArray = ( void ** ) ( struct keyboard * ) malloc( sizeof( struct keyboard ) * size );
*structByteSize = sizeof( struct keyboard );
break;
case 3:
voidArray = ( void ** ) ( struct screen * ) malloc( sizeof( struct screen ) * size );
*structByteSize = sizeof( struct screen );
break;
case 4:
voidArray = ( void ** ) ( struct mouse * ) malloc( sizeof( struct mouse ) * size );
*structByteSize = sizeof( struct mouse );
break;
case 5:
voidArray = ( void ** ) ( struct vector2 * ) malloc( sizeof( struct vector2 ) * size );
*structByteSize = sizeof( struct vector2 );
break;
case 8:
voidArray = ( void ** ) ( struct quadMesh * ) malloc( sizeof( struct quadMesh ) * size );
*structByteSize = sizeof( struct quadMesh );
break;
case 9:
voidArray = ( void ** ) ( struct element * ) malloc( sizeof( struct element ) * size );
*structByteSize = sizeof( struct element );
break;
case 10:
voidArray = ( void ** ) ( struct vector4 * ) malloc( sizeof( struct vector4 ) * size );
*structByteSize = sizeof( struct vector4 );
break;
case 11:
voidArray = ( void ** ) ( struct windowManager * ) malloc( sizeof( struct windowManager ) * size );
*structByteSize = sizeof( struct windowManager );
break;
case 12:
voidArray = ( void ** ) ( struct Hints * ) malloc( sizeof( struct Hints ) * size );
*structByteSize = sizeof( struct Hints );
break;
case 13:
voidArray = ( void ** ) ( struct resourceManager * ) malloc( sizeof( struct resourceManager ) * size );
*structByteSize = sizeof( struct resourceManager );
break;
case 14:
voidArray = ( void ** ) ( struct texture2D * ) malloc( sizeof( struct texture2D ) * size );
*structByteSize = sizeof( struct texture2D );
break;
case 15:
voidArray = ( void ** ) ( struct tesselation * ) malloc( sizeof( struct tesselation ) * size );
*structByteSize = sizeof( struct tesselation );
break;
case 16:
voidArray = ( void ** ) ( struct mesh * ) malloc( sizeof( struct mesh ) * size );
*structByteSize = sizeof( struct mesh );
break;
case 17:
voidArray = ( void ** ) ( struct unsignedIntegerArray * ) malloc( sizeof( struct unsignedIntegerArray ) * size );
*structByteSize = sizeof( struct unsignedIntegerArray );
break;
case 18:
voidArray = ( void ** ) ( struct floatArray * ) malloc( sizeof( struct floatArray ) * size );
*structByteSize = sizeof( struct floatArray );
break;
case 19:
voidArray = ( void ** ) ( struct program * ) malloc( sizeof( struct program ) * size );
*structByteSize = sizeof( struct program );
break;
case 20:
voidArray = ( void ** ) ( struct shader * ) malloc( sizeof( struct shader ) * size );
*structByteSize = sizeof( struct shader );
break;
case 21:
voidArray = ( void ** ) ( struct attribute * ) malloc( sizeof( struct attribute ) * size );
*structByteSize = sizeof( struct attribute );
break;
case 22:
voidArray = ( void ** ) ( struct sampler2D * ) malloc( sizeof( struct sampler2D ) * size );
*structByteSize = sizeof( struct sampler2D );
break;
case 23:
voidArray = ( void ** ) ( struct vector3 * ) malloc( sizeof( struct vector3 ) * size );
*structByteSize = sizeof( struct vector3 );
break;
case 24:
voidArray = ( void ** ) ( struct array * ) malloc( sizeof( struct array ) * size );
*structByteSize = sizeof( struct array );
break;
case 25:
voidArray = ( void ** ) ( struct text * ) malloc( sizeof( struct text ) * size );
*structByteSize = sizeof( struct text );
break;
case 27:
voidArray = ( void ** ) ( struct fileSystem * ) malloc( sizeof( struct fileSystem ) * size );
*structByteSize = sizeof( struct fileSystem );
break;
case 28:
voidArray = ( void ** ) ( struct consoleManager * ) malloc( sizeof( struct consoleManager ) * size );
*structByteSize = sizeof( struct consoleManager );
break;
case 29:
voidArray = ( void ** ) ( struct http * ) malloc( sizeof( struct http ) * size );
*structByteSize = sizeof( struct http );
break;
case 30:
voidArray = ( void ** ) ( struct headerManager * ) malloc( sizeof( struct headerManager ) * size );
*structByteSize = sizeof( struct headerManager );
break;
case 31:
voidArray = ( void ** ) ( struct header * ) malloc( sizeof( struct header ) * size );
*structByteSize = sizeof( struct header );
break;
case 32:
voidArray = ( void ** ) ( struct request * ) malloc( sizeof( struct request ) * size );
*structByteSize = sizeof( struct request );
break;
case 33:
voidArray = ( void ** ) ( struct cache * ) malloc( sizeof( struct cache ) * size );
*structByteSize = sizeof( struct cache );
break;
case 34:
voidArray = ( void ** ) ( struct file * ) malloc( sizeof( struct file ) * size );
*structByteSize = sizeof( struct file );
break;
case 35:
voidArray = ( void ** ) ( struct mimeTypes * ) malloc( sizeof( struct mimeTypes ) * size );
*structByteSize = sizeof( struct mimeTypes );
break;
case 36:
voidArray = ( void ** ) ( struct uniform * ) malloc( sizeof( struct uniform ) * size );
*structByteSize = sizeof( struct uniform );
break;
case 37:
voidArray = ( void ** ) ( struct member * ) malloc( sizeof( struct member ) * size );
*structByteSize = sizeof( struct member );
break;
case 38:
voidArray = ( void ** ) ( struct block * ) malloc( sizeof( struct block ) * size );
*structByteSize = sizeof( struct block );
break;
case 39:
voidArray = ( void ** ) ( struct fontRenderer * ) malloc( sizeof( struct fontRenderer ) * size );
*structByteSize = sizeof( struct fontRenderer );
break;
case 40:
voidArray = ( void ** ) ( struct renderPass * ) malloc( sizeof( struct renderPass ) * size );
*structByteSize = sizeof( struct renderPass );
break;
case 41:
voidArray = ( void ** ) ( struct compute2 * ) malloc( sizeof( struct compute2 ) * size );
*structByteSize = sizeof( struct compute2 );
break;
case 42:
voidArray = ( void ** ) ( struct compute * ) malloc( sizeof( struct compute ) * size );
*structByteSize = sizeof( struct compute );
break;
case 43:
voidArray = ( void ** ) ( struct font * ) malloc( sizeof( struct font ) * size );
*structByteSize = sizeof( struct font );
break;
case 44:
voidArray = ( void ** ) ( struct quads * ) malloc( sizeof( struct quads ) * size );
*structByteSize = sizeof( struct quads );
break;
case 45:
voidArray = ( void ** ) ( struct pipeline * ) malloc( sizeof( struct pipeline ) * size );
*structByteSize = sizeof( struct pipeline );
break;
case 46:
voidArray = ( void ** ) ( struct eventManger * ) malloc( sizeof( struct eventManger ) * size );
*structByteSize = sizeof( struct eventManger );
break;
}
}
void callMethodOfClass( int classIndex, int methodIndex, void * object ) {
switch( classIndex ) {
case 0:
switch( methodIndex ) {
case 0:
opengl_initialize( object );
break;
case 1:
opengl_showExtensions( object );
break;
case 2:
opengl_showVersion( object );
break;
case 3:
opengl_setupTime( object );
break;
case 4:
opengl_setupManagers( object );
break;
case 5:
opengl_setupWindow( object );
break;
case 6:
opengl_setupRenderLoop( object );
break;
case 7:
opengl_setupPipeline( object );
break;
case 9:
opengl_render( object );
break;
case 10:
opengl_displayFPS( object );
break;
case 13:
opengl_swapBuffers( object );
break;
}
break;
case 1:
switch( methodIndex ) {
}
break;
case 2:
switch( methodIndex ) {
}
break;
case 3:
switch( methodIndex ) {
}
break;
case 4:
switch( methodIndex ) {
}
break;
case 5:
switch( methodIndex ) {
case 5:
vector2_length( object );
break;
}
break;
case 8:
switch( methodIndex ) {
}
break;
case 9:
switch( methodIndex ) {
case 0:
element_constructor( object );
break;
case 2:
element_setOriginal( object );
break;
case 7:
element_updateFeature( object );
break;
case 9:
element_click( object );
break;
case 10:
element_mousedown( object );
break;
case 11:
element_mouseup( object );
break;
case 12:
element_mouseover( object );
break;
case 13:
element_mouseleave( object );
break;
}
break;
case 10:
switch( methodIndex ) {
}
break;
case 11:
switch( methodIndex ) {
case 0:
windowManager_setupDisplay( object );
break;
case 1:
windowManager_setupWindow( object );
break;
}
break;
case 12:
switch( methodIndex ) {
}
break;
case 13:
switch( methodIndex ) {
}
break;
case 14:
switch( methodIndex ) {
}
break;
case 15:
switch( methodIndex ) {
case 1:
tesselation_prepare( object );
break;
case 2:
tesselation_render( object );
break;
}
break;
case 16:
switch( methodIndex ) {
case 7:
mesh_createBuffers( object );
break;
case 8:
mesh_createOrderedTriangleStripQuad( object );
break;
}
break;
case 17:
switch( methodIndex ) {
case 0:
unsignedIntegerArray_length( object );
break;
case 10:
unsignedIntegerArray_pop( object );
break;
}
break;
case 18:
switch( methodIndex ) {
case 0:
floatArray_length( object );
break;
case 10:
floatArray_pop( object );
break;
}
break;
case 19:
switch( methodIndex ) {
case 3:
program_extractBlocks( object );
break;
case 6:
program_create( object );
break;
case 8:
program_use( object );
break;
case 9:
program_extractUniforms( object );
break;
case 10:
program_extractAttributes( object );
break;
}
break;
case 20:
switch( methodIndex ) {
}
break;
case 21:
switch( methodIndex ) {
}
break;
case 22:
switch( methodIndex ) {
case 0:
sampler2D_constructor( object );
break;
case 2:
sampler2D_getTextureIndex( object );
break;
case 3:
sampler2D_bind( object );
break;
}
break;
case 23:
switch( methodIndex ) {
}
break;
case 24:
switch( methodIndex ) {
case 0:
array_length( object );
break;
case 1:
array_data( object );
break;
case 10:
array_pop( object );
break;
}
break;
case 25:
switch( methodIndex ) {
case 9:
text_toNative( object );
break;
case 11:
text_free( object );
break;
}
break;
case 27:
switch( methodIndex ) {
}
break;
case 28:
switch( methodIndex ) {
case 4:
consoleManager_createHorisontalLine( object );
break;
}
break;
case 29:
switch( methodIndex ) {
case 1:
http_initializeOpenSSL( object );
break;
case 5:
http_acceptConnection( object );
break;
}
break;
case 30:
switch( methodIndex ) {
case 1:
headerManager_display( object );
break;
}
break;
case 31:
switch( methodIndex ) {
}
break;
case 32:
switch( methodIndex ) {
case 0:
request_constructor( object );
break;
case 1:
request_free( object );
break;
}
break;
case 33:
switch( methodIndex ) {
}
break;
case 34:
switch( methodIndex ) {
}
break;
case 35:
switch( methodIndex ) {
case 0:
mimeTypes_constructor( object );
break;
}
break;
case 36:
switch( methodIndex ) {
}
break;
case 37:
switch( methodIndex ) {
}
break;
case 38:
switch( methodIndex ) {
case 1:
block_enableAutoUpload( object );
break;
case 2:
block_getBufferTypeText( object );
break;
case 3:
block_createBuffer( object );
break;
case 4:
block_upload( object );
break;
}
break;
case 39:
switch( methodIndex ) {
}
break;
case 40:
switch( methodIndex ) {
case 0:
renderPass_prepare( object );
break;
case 1:
renderPass_render( object );
break;
}
break;
case 41:
switch( methodIndex ) {
case 0:
compute2_prepare( object );
break;
case 1:
compute2_render( object );
break;
}
break;
case 42:
switch( methodIndex ) {
case 0:
compute_prepare( object );
break;
case 1:
compute_render( object );
break;
}
break;
case 43:
switch( methodIndex ) {
case 1:
font_prepare( object );
break;
case 2:
font_render( object );
break;
}
break;
case 44:
switch( methodIndex ) {
case 1:
quads_prepare( object );
break;
case 3:
quads_createMeshes( object );
break;
case 7:
quads_render( object );
break;
}
break;
case 45:
switch( methodIndex ) {
case 1:
pipeline_render( object );
break;
}
break;
case 46:
switch( methodIndex ) {
case 0:
eventManger_constructor( object );
break;
case 1:
eventManger_fetchEvent( object );
break;
}
break;
}
}
// #include "sqlite.h"
int getPropertyIndexOfClassIndex( int propertyCount, char ** propertyNames ) {
int propertyIdOfIndex = -1;
for ( int i = 0; i < propertyCount; ++i )
{
char * propertyName = propertyNames[i];
//printf("propertyName: %s\n", propertyName);
if( strcmp( propertyName, "id" ) == 0 ) {
propertyIdOfIndex = i;
break;
}
}
return propertyIdOfIndex;
}
/*
void getArrayByClassIndex( int items, void * * voidArray, int * structByteSize, int classIndex ) {
struct user * array;
switch( classIndex ) {
case 8:
array = ( struct user * ) malloc( sizeof( struct user ) * 1000 );
voidArray = ( void ** ) array;
*structByteSize = sizeof( struct user );
break;
default:
array = ( struct user * ) malloc( sizeof( struct user ) * 1000 );
voidArray = ( void ** ) array;
*structByteSize = sizeof( struct user );
}
}*/
char * getClassName( int classIndex ) {
return __ClassNames[ classIndex ];
}
int getClassIndexByClassName( char * className ) {
for (int i = 0; i < TOTAL_CLASS_COUNT; ++i)
{
char * currentClassName = __ClassNames[ i ];
if( strcmp( className, currentClassName ) == 0 ) {
//printf("find classname: %s\n", className);
return i;
}
}
return -1;
}
int getPropertyCountByClassIndex( int classIndex ) {
return __ClassPropertyCount[ classIndex ];
}
char * * getPropertiesByClassIndex( int classIndex ) {
return __ClassPropertyNames[ classIndex ];
}
int * getPropertyOffsetsByClassIndex( int classIndex ) {
return __ClassPropertyOffsets[ classIndex ];
}
int getPropertyOffsetByPropertyIndex( int * propertyOffsets, int propertyIndex ) {
return propertyOffsets[ propertyIndex ];
}
int * getPropertyDatatypeIndexesByClassIndex( int classIndex ) {
return __ClassPropertyDatatypeIndices[ classIndex ];
}
int getPropertyDatatypeIndex( int * propertyDatatypeIndices, int propertyIndex ) {
return propertyDatatypeIndices[ propertyIndex ];
}
int getPropertyIndexByPropertyName( int classID, char * propertyName ) {
int propertyCount = getPropertyCountByClassIndex( classID );
char * * propertyNames = getPropertiesByClassIndex( classID );
for (int i = 0; i < propertyCount; ++i)
{
char * propertyNameCompare = propertyNames[i];
if( strcmp( propertyName, propertyNameCompare ) == 0 ) {
return i;
}
}
return -1;
}
int getMethodCountByClassIndex( int classIndex ) {
return __ClassMethodCount[ classIndex ];
}
char * * getMethodNamesByClassIndex( int classIndex ) {
return __ClassMethodNames[ classIndex ];
}
int getMethodIndexByPropertyName( int classID, char * propertyName ) {
int methodCount = getMethodCountByClassIndex( classID );
char * * methodNames = getMethodNamesByClassIndex( classID );
for (int i = 0; i < methodCount; ++i)
{
char * propertyNameCompare = methodNames[i];
if( strcmp( propertyName, propertyNameCompare ) == 0 ) {
return i;
}
}
return -1;
}