Changeset 241 for vtcross/branches/fixingCBR/src/include
- Timestamp:
- 04/08/09 17:45:45 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/branches/fixingCBR/src/include/vtcross/cbr.h
r240 r241 30 30 31 31 32 33 32 /* TODO Please explain me. 34 33 */ … … 41 40 }; 42 41 42 /* TODO This is a terribly hackish way to go about this. Why not just use actual 43 * pointers? Typedefing the pointer out makes the code misleading and hard to 44 * understand. 45 */ 43 46 typedef cbr_s * cbr; 47 44 48 45 49 /* TODO I don't think these functions do what you want them to do. The … … 47 51 * being malloc'd in the cbr_create function is effectively a memory leak, since 48 52 * you lose the reference to that memory, and instead return a copy of the data 49 * in that memory space. */ 53 * in that memory space. 54 */ 50 55 cbr cbr_create(char * _filename, char * _tablename, char * _cols[], \ 51 56 unsigned int _len); 57 52 58 void cbr_free(cbr _cbr); 53 59 60 /* Opens a database, or creates a new one if it does not exist, with the name 61 * stored within the passed cbr struct object. 62 */ 63 int OpenDatabase(cbr _cbr); 64 65 /* TODO What is this for? 66 */ 67 int callback(void *notUsed, int argc, char **argv, char **azColName); 68 69 /* TODO 70 */ 71 int ExecuteCommand(cbr _cbr); 72 73 /* TODO 74 */ 75 int ExecuteSearchCommand(cbr _cbr, float *_retvals); 76 77 /* TODO 78 */ 54 79 void cbr_print(cbr _cbr); 55 80 81 /* TODO 82 */ 56 83 int cbr_search(cbr _cbr, char *_names[], int * _ops, float *_vals, \ 57 84 unsigned int _n, float *_retvals); 58 85 86 /* TODO 87 */ 59 88 int cbr_add_row(cbr _cbr, char *_cols[], float *_vals, unsigned int _len); 60 89 61 62 // open a database or create a database if it does not exist 63 int OpenDatabase(cbr _cbr); 64 65 66 // simple callback function, display result 67 int callback(void *notUsed, int argc, char **argv, char **azColName); 68 69 70 // execute command 71 int ExecuteCommand(cbr _cbr); 72 73 74 // execute search command 75 int ExecuteSearchCommand(cbr _cbr, float *_retvals); 76 77 78 // print 79 void cbr_print(cbr _cbr); 80 81 82 // cbr search 83 int cbr_search(cbr _cbr, char *_names[], int * _ops, float *_vals, \ 84 unsigned int _n, float *_retvals); 85 86 // update a row 90 /* TODO 91 */ 87 92 int cbr_update(cbr _cbr, char *_where[], char*_set[], float *_wherevals, \ 88 93 float *_setvals, unsigned int _wherelen, unsigned int _setlen); 89 94 90 // cbr add a row91 int cbr_add_row(cbr _cbr, char *_cols[], float *_vals, unsigned int _len);92 95 93 96 #endif