home *** CD-ROM | disk | FTP | other *** search
- // test database
- //include "TestDatabase.cnd"
-
- var i32x g_iActiveDatabase;
-
- func void MyDatabase_AddTables(i32x _iNumTables)
- {
- Database_AddTables(g_iActiveDatabase,_iNumTables);
- }
-
-
- func void MyDatabase_Create()
- {
- Database_Create(g_iActiveDatabase);
- }
-
- func void MyDatabase_Update()
- {
- Database_Update(g_iActiveDatabase);
- }
-
- func void MyTable_SetName(i32x _iTableIndex, szx _szTableName)
- {
- Table_SetName(g_iActiveDatabase,_iTableIndex, _szTableName);
- }
-
- func void MyTable_AddCols(i32x _iTableIndex, i32x _iNumCols)
- {
- Table_AddCols(g_iActiveDatabase,_iTableIndex, _iNumCols);
- }
-
- func void MyTable_AddRows(i32x _iTableIndex, i32x _iNumRows)
- {
- Table_AddRows(g_iActiveDatabase,_iTableIndex, _iNumRows);
- }
-
- func void MyColumn_SetName(i32x _iTableIndex, i32x _iColumnIndex, szx _szColumnName)
- {
- Column_SetName(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _szColumnName);
- }
-
- func void MyColumn_SetType(i32x _iTableIndex, i32x _iColumnIndex, i32x _iColumnType)
- {
- Column_SetType(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iColumnType);
- }
-
- func void MyRow_SetIntBlock(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, i32x _iNumValues, i32x _iValue0, i32x _iValue1, i32x _iValue2, i32x _iValue3, i32x _iValue4, i32x _iValue5, i32x _iValue6, i32x _iValue7, i32x _iValue8, i32x _iValue9, i32x _iValue10, i32x _iValue11, i32x _iValue12, i32x _iValue13, i32x _iValue14, i32x _iValue15)
- {
- Row_SetIntBlock(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _iNumValues, _iValue0, _iValue1, _iValue2, _iValue3, _iValue4, _iValue5, _iValue6, _iValue7, _iValue8, _iValue9, _iValue10, _iValue11, _iValue12, _iValue13, _iValue14, _iValue15);
- }
-
- func void MyRow_SetFloatBlock(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, i32x _iNumValues, f32x _fValue0, f32x _fValue1, f32x _fValue2, f32x _fValue3, f32x _fValue4, f32x _fValue5, f32x _fValue6, f32x _fValue7, f32x _fValue8, f32x _fValue9, f32x _fValue10, f32x _fValue11, f32x _fValue12, f32x _fValue13, f32x _fValue14, f32x _fValue15)
- {
- Row_SetFloatBlock(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _iNumValues, _fValue0, _fValue1, _fValue2, _fValue3, _fValue4, _fValue5, _fValue6, _fValue7, _fValue8, _fValue9, _fValue10, _fValue11, _fValue12, _fValue13, _fValue14, _fValue15);
- }
-
- func void MyRow_SetStringBlock(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, i32x _iNumValues, szx _szValue0, szx _szValue1, szx _szValue2, szx _szValue3, szx _szValue4, szx _szValue5, szx _szValue6, szx _szValue7, szx _szValue8, szx _szValue9, szx _szValue10, szx _szValue11, szx _szValue12, szx _szValue13, szx _szValue14, szx _szValue15)
- {
- Row_SetStringBlock(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _iNumValues, _szValue0, _szValue1, _szValue2, _szValue3, _szValue4, _szValue5, _szValue6, _szValue7, _szValue8, _szValue9, _szValue10, _szValue11, _szValue12, _szValue13, _szValue14, _szValue15);
- }
-
- func void MyRow_SetStringData(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, szx _szValue)
- {
- Row_SetStringData(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _szValue);
- }
-
-
- func void MyRow_SetListSizeBlock(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, i32x _iNumValues, i32x _iValue0, i32x _iValue1, i32x _iValue2, i32x _iValue3, i32x _iValue4, i32x _iValue5, i32x _iValue6, i32x _iValue7, i32x _iValue8, i32x _iValue9, i32x _iValue10, i32x _iValue11, i32x _iValue12, i32x _iValue13, i32x _iValue14, i32x _iValue15)
- {
- Row_SetListSizeBlock(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _iNumValues, _iValue0, _iValue1, _iValue2, _iValue3, _iValue4, _iValue5, _iValue6, _iValue7, _iValue8, _iValue9, _iValue10, _iValue11, _iValue12, _iValue13, _iValue14, _iValue15);
- }
-
- func void MyRow_SetListIntBlock(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, i32x _iListIndex, i32x _iNumValues, i32x _iValue0, i32x _iValue1, i32x _iValue2, i32x _iValue3, i32x _iValue4, i32x _iValue5, i32x _iValue6, i32x _iValue7, i32x _iValue8, i32x _iValue9, i32x _iValue10, i32x _iValue11, i32x _iValue12, i32x _iValue13, i32x _iValue14, i32x _iValue15)
- {
- Row_SetListIntBlock(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _iListIndex, _iNumValues, _iValue0, _iValue1, _iValue2, _iValue3, _iValue4, _iValue5, _iValue6, _iValue7, _iValue8, _iValue9, _iValue10, _iValue11, _iValue12, _iValue13, _iValue14, _iValue15);
- }
-
- func void MyRow_SetListFloatBlock(i32x _iTableIndex, i32x _iColumnIndex, i32x _iRowIndex, i32x _iListIndex, i32x _iNumValues, f32x _fValue0, f32x _fValue1, f32x _fValue2, f32x _fValue3, f32x _fValue4, f32x _fValue5, f32x _fValue6, f32x _fValue7, f32x _fValue8, f32x _fValue9, f32x _fValue10, f32x _fValue11, f32x _fValue12, f32x _fValue13, f32x _fValue14, f32x _fValue15)
- {
- Row_SetListFloatBlock(g_iActiveDatabase,_iTableIndex, _iColumnIndex, _iRowIndex, _iListIndex, _iNumValues, _fValue0, _fValue1, _fValue2, _fValue3, _fValue4, _fValue5, _fValue6, _fValue7, _fValue8, _fValue9, _fValue10, _fValue11, _fValue12, _fValue13, _fValue14, _fValue15);
- }
-
-
-
- interface Database_ClientInterface
- {
-
- MyDatabase_AddTables Database_AddTables;
- MyDatabase_Create Database_Create;
- MyDatabase_Update Database_Update;
-
- MyTable_SetName Table_SetName;
- MyTable_AddCols Table_AddCols;
- MyTable_AddRows Table_AddRows;
-
- MyColumn_SetName Column_SetName;
- MyColumn_SetType Column_SetType;
-
- MyRow_SetIntBlock Row_SetIntBlock;
- MyRow_SetFloatBlock Row_SetFloatBlock;
- MyRow_SetStringBlock Row_SetStringBlock;
-
- MyRow_SetListSizeBlock Row_SetListSizeBlock;
- MyRow_SetListIntBlock Row_SetListIntBlock;
- MyRow_SetListFloatBlock Row_SetListFloatBlock;
-
- MyRow_SetStringData Row_SetStringData;
- }
-
- func void Database_ClientConnect(Net_Client _client)
- {
- }
-
- func void Database_ClientDisconnect(Net_Client _client)
- {
- }
-
-
-
- func void Database_Open(i32x _iActiveDatabase,szx _szDatabase)
- {
- print("Load database : ");
- println(_szDatabase);
-
- g_iActiveDatabase = _iActiveDatabase;
- var szx szDatabase;
- var Net_Client myclient;
- szDatabase = strcat("<",_szDatabase);
- myclient = NetClient_Create(
- szDatabase, 1111,
- Database_ClientInterface,
- Database_ClientConnect,
- Database_ClientDisconnect);
- NetClient_Destroy(myclient);
- }
-
-