Last modified 4 years ago
Last modified on 07/25/08 21:50:24
Input file
C struct definition output
/* This file is generated automatically, do not edit, change the source (test_code.tpl) instead. */ #ifndef __INCLUDED_DB_TEMPLATE_SCHEMA_STRUCTDEF_TEST_CODE_TPL_H__ #define __INCLUDED_DB_TEMPLATE_SCHEMA_STRUCTDEF_TEST_CODE_TPL_H__ /** * Enumerates the different technology levels */ typedef enum { TECH_LEVEL_ONE, TECH_LEVEL_TWO, TECH_LEVEL_THREE, } TECH_LEVEL; typedef struct { /** * Unique language independant name that can be used to identify a specific * stats instance * * Unique across all instances */ const char* id; /** * short name, describing the component, must be translateable */ const char* name; } STATS_BASE; /** * Represents a researchable component statistic */ typedef struct { /* BEGIN of inherited "BASE" definition */ /** * Unique language independant name that can be used to identify a specific * stats instance * * Unique across all instances */ const char* id; /** * short name, describing the component, must be translateable */ const char* name; /* END of inherited "BASE" definition */ /** * Technology level(s) of this component * * @see TECH_LEVEL for the meaning of index values */ bool level[3]; /** * Power required to build this component */ float buildPower; /** * Build points (which are rate-limited in the construction units) required * to build this component. */ float buildPoints; /** * Weight of this component */ float weight; /** * Indicates whether this component is "designable" and can thus be used in * the design screen. */ bool designable; /** * @TODO devise some kind of type to refer to IMD models; perhaps just * filenames will suffice? * * We'll name it IMD_model for now. * * The "base" IMD model representing this component in 3D space. *### IMD_model baseModel; */ const char* baseModel; } STATS_COMPONENT; /** * Will contain all data associated with a body */ typedef struct { /* BEGIN of inherited "COMPONENT" definition */ /* BEGIN of inherited "BASE" definition */ /** * Unique language independant name that can be used to identify a specific * stats instance * * Unique across all instances */ const char* id; /** * short name, describing the component, must be translateable */ const char* name; /* END of inherited "BASE" definition */ /** * Technology level(s) of this component * * @see TECH_LEVEL for the meaning of index values */ bool level[3]; /** * Power required to build this component */ float buildPower; /** * Build points (which are rate-limited in the construction units) required * to build this component. */ float buildPoints; /** * Weight of this component */ float weight; /** * Indicates whether this component is "designable" and can thus be used in * the design screen. */ bool designable; /** * @TODO devise some kind of type to refer to IMD models; perhaps just * filenames will suffice? * * We'll name it IMD_model for now. * * The "base" IMD model representing this component in 3D space. *### IMD_model baseModel; */ const char* baseModel; /* END of inherited "COMPONENT" definition */ /** * The number of available weaponSlots slots on the body */ unsigned int weaponSlots; /** * Engine output of this body's engine */ float powerOutput; } STATS_BODY; #endif // __INCLUDED_DB_TEMPLATE_SCHEMA_STRUCTDEF_TEST_CODE_TPL_H__
SQL table definition output
-- This file is generated automatically, do not edit, change the source (test_code.tpl) instead. CREATE TABLE `BASE` ( -- Automatically generated ID to link the inheritance hierarchy. unique_inheritance_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, -- Unique language independant name that can be used to identify a specific -- stats instance id TEXT NOT NULL UNIQUE, -- short name, describing the component, must be translateable name TEXT NOT NULL ); -- Represents a researchable component statistic CREATE TABLE `COMPONENT` ( -- Automatically generated ID to link the inheritance hierarchy. unique_inheritance_id INTEGER PRIMARY KEY NOT NULL, -- Technology level(s) of this component level_ONE INTEGER NOT NULL, level_TWO INTEGER NOT NULL, level_THREE INTEGER NOT NULL, -- Power required to build this component buildPower NUMERIC NOT NULL, -- Build points (which are rate-limited in the construction units) required -- to build this component. buildPoints NUMERIC NOT NULL, -- Weight of this component weight NUMERIC NOT NULL, -- Indicates whether this component is "designable" and can thus be used in -- the design screen. designable INTEGER NOT NULL, -- @TODO devise some kind of type to refer to IMD models; perhaps just -- filenames will suffice? -- -- We'll name it IMD_model for now. -- -- The "base" IMD model representing this component in 3D space. --### IMD_model baseModel; baseModel TEXT NOT NULL ); -- Will contain all data associated with a body CREATE TABLE `BODY` ( -- Automatically generated ID to link the inheritance hierarchy. unique_inheritance_id INTEGER PRIMARY KEY NOT NULL, -- The number of available weaponSlots slots on the body weaponSlots INTEGER NOT NULL, -- Engine output of this body's engine powerOutput NUMERIC NOT NULL );
