Es eso, un ejemplo. Viene el fuente del mismo con la propuesta de tipo de programación que yo haría y el ejecutable.
La definicion en lenguaje C usando el preprocesador es la que pongo más abajo. Me gustaría que si veis un método que pueda faltar que me lo diga
Code: Select all
CREATE_CLASS( "TCDBF", TCDBF, TCDBF_IVARCOUNT )
// Datas:
VAR( "BUFFER", TCDBF_BUFFER, TCDBF_VNULL ); // Solo lectura
// Metodos de área de trabajo / gestión de base de datos:
METHOD( "NEW", TCDBF_INIT );
METHOD( "CREATE", DBCREATE );
METHOD( "SELECT", TCDBF_SELECT );
METHOD( "OPEN", TCDBF_OPEN );
METHOD( "CLOSE", TCDBF_CLOSE );
METHOD( "EVAL", TCDBF_EVAL );
METHOD( "INFO", TCDBF_INFO );
METHOD( "PACK", TCDBF_PACK );
METHOD( "SYSNAME", TCDBF_SYSNAME );
METHOD( "ZAP", TCDBF_ZAP );
METHOD( "USED", TCDBF_USED );
METHOD( "ISOPEN", TCDBF_USED );
METHOD( "FREE", TCDBF_FREE );
METHOD( "ALIAS", TCDBF_ALIAS );
METHOD( "GETAREA", TCDBF_GETAREA );
// MEtodos de bloqueos en red
METHOD( "RECLOCK", TCDBF_RECLOCK );
METHOD( "FLOCK", TCDBF_FLOCK );
METHOD( "UNLOCK", TCDBF_UNLOCK );
// Metodos no Area de trabajo
METHOD( "DROP", HB_DBDROP );
METHOD( "EXISTS", HB_DBEXISTS );
METHOD( "RENAME", HB_DBRENAME );
// Metodos de moviemiento y posicion:
METHOD( "EOF", TCDBF_EOF );
METHOD( "BOF", TCDBF_BOF );
METHOD( "GOTOP", TCDBF_GOTOP );
METHOD( "GOBOTTOM", TCDBF_GOBOTTOM );
METHOD( "SKIP", TCDBF_SKIP );
METHOD( "FOUND", TCDBF_FOUND );
METHOD( "GOTO", TCDBF_GOTO );
METHOD( "SEEK", TCDBF_SEEK );
// Metodos de gestion de datos:
METHOD( "APPEND", TCDBF_APPEND );
METHOD( "DELETE", TCDBF_DELETE );
METHOD( "DELETED", TCDBF_DELETED );
METHOD( "ISSELECTED", TCDBF_ISSELECTED );
METHOD( "FIELDCOUNT", TCDBF_FIELDCOUNT );
METHOD( "FIELDGET", TCDBF_FIELDGET );
METHOD( "FIELDPUT", TCDBF_FIELDPUT );
METHOD( "FIELDLEN", TCDBF_FIELDLEN );
METHOD( "FIELDINFO", TCDBF_FIELDINFO );
METHOD( "FIELDNAME", TCDBF_FIELDNAME );
METHOD( "RECNO", TCDBF_RECNO );
METHOD( "RECCOUNT", TCDBF_RECCOUNT );
METHOD( "COMMIT", TCDBF_COMMIT );
METHOD( "RECALL", TCDBF_RECALL );
METHOD( "RECINFO", TCDBF_RECINFO );
// Métodos de gestion de relaciones
METHOD( "SETRELATION", TCDBF_SETRELATION );
METHOD( "CLEARRELATION", TCDBF_CLEARRELATION );
METHOD( "RELAREA", TCDBF_RELAREA );
METHOD( "RELTEXT", TCDBF_RELTEXT );
// Métodos de gestión de ordenaciones
METHOD( "ORDCREATE", TCDBF_ORDCREATE );
METHOD( "ORDLISTREBUILD", TCDBF_ORDLISTREBUILD );
METHOD( "ORDLISTADD", TCDBF_ORDLISTADD );
METHOD( "ORDLISTCLEAR", TCDBF_ORDLISTCLEAR );
METHOD( "ORDSETFOCUS", TCDBF_ORDSETFOCUS );
// Basadas en ORDINFO:
METHOD( "ORDINFO", TCDBF_ORDINFO ); // Utilizar para todo lo que se pueda
METHOD( "ORDKEYCOUNT", TCDBF_ORDKEYCOUNT );
METHOD( "ORDFULLPATH", TCDBF_FULLPATH );
METHOD( "ORDKEY", TCDBF_ORDKEY );
METHOD( "ORDNAME", TCDBF_ORDNAME );
METHOD( "ORDBAGNAME", TCDBF_ORDBAGNAME );
METHOD( "ORDBAGEXT", TCDBF_ORDBAGEXT );
METHOD( "ORDCOND", TCDBF_ORDCOND );
METHOD( "ORDNUMBER", TCDBF_ORDNUMBER );
METHOD( "ORDCOUNT", TCDBF_ORDCOUNT );
METHOD( "ORDKEYNO", TCDBF_ORDKEYNO );
METHOD( "ORDKEYGOTO", TCDBF_ORDKEYGOTO );
METHOD( "ORDKEYRELPOS", TCDBF_ORDKEYRELPOS );
METHOD( "ORDFINDREC", TCDBF_ORDFINDREC );
METHOD( "ORDKEYVAL", TCDBF_ORDKEYVAL );
// Metodos de gestion de filtros y scopes
METHOD( "SETSCOPETOP", TCDBF_SETSCOPETOP );
METHOD( "SETSCOPEBOTTOM", TCDBF_SETSCOPEBOTTOM );
METHOD( "SETFILTER", TCDBF_SETFILTER );
METHOD( "CLEARFILTER", TCDBF_CLEARFILTER );
METHOD( "LOCATE", TCDBF_LOCATE );
METHOD( "SETLOCATE", TCDBF_SETLOCATE );
METHOD( "CONTINUE", TCDBF_CONTINUE );
METHOD( "CLEARLOCATE", TCDBF_CLEARLOCATE );
METHOD( "FILTERTEXT", TCDBF_FILTERTEXT );
// Metodos de manejo de campos MEMO y BLOB
METHOD( "GETVALUEFILE", TCDBF_GETVALUEFILE );
METHOD( "PUTVALUEFILE", TCDBF_PUTVALUEFILE );
//------------------------------------------------------------------------------
// Metodos del buffer (hash table)
METHOD( "LOAD", TCDBF_LOAD );
METHOD( "SAVE", TCDBF_SAVE );
METHOD( "UPDATE", TCDBF_UPDATE );
METHOD( "INSERT", TCDBF_INSERT );
METHOD( "REMOVE", TCDBF_REMOVE );
METHOD( "BUFFERLEN", TCDBF_BUFFERLEN );
METHOD( "BUFFERKEYAT", TCDBF_BUFFERKEYAT );
METHOD( "BUFFERKEYS", TCDBF_BUFFERKEYS );
METHOD( "GETBUFFER", TCDBF_GETBUFFER );
METHOD( "GETBUFFERAT", TCDBF_GETBUFFERAT );
METHOD( "SETBUFFER", TCDBF_SETBUFFER );
METHOD( "SETBUFFERAT", TCDBF_SETBUFFERAT );
METHOD( "ABUFFER", TCDBF_ABUFFER );
METHOD( "BLANK", TCDBF_BLANK );
METHOD( "SETBUFKEYCASEMATCH", TCDBF_SETBUFKEYCASEMATCH );
END_CLASS