home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / code / kdbf / intstrct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-19  |  3.6 KB  |  79 lines

  1. /***********************************************************************                   
  2. **                            INTSTRCT.H                                                         
  3. **
  4. ** This file contains structure definitions used to keep track of          
  5. ** internal variables of each class. In each class of the Paradox 
  6. ** Engine library header (.H) files, only a void pointer is declared,
  7. ** even though each of those pointers points to a structure. That 
  8. ** way, the the class interface does not change at the application 
  9. ** level a user does not need to recompile their programs with every 
  10. ** new version of the Class library.      
  11. **
  12. ** Example: engobj in the BEngine class is declared void * even though 
  13. ** it could be declared as engdef *.          
  14. **
  15. ***********************************************************************/
  16.  
  17. // DBF - (C) Copyright 1994 by Borland International
  18.  
  19. #if !defined( INTSTRCT_H )
  20. #define INTSTRCT_H
  21.  
  22. typedef struct {
  23.                char *tableName;          // Structure to store key map.
  24.                int   indexId;           // Information on composite keys. 
  25.                int   keyCnt; 
  26.                int  *fieldArray;
  27.                } keyMapdef;           
  28.  
  29. typedef struct {  
  30.                BEnv          engenv; 
  31.                int           handleCnt;    // Number of databases.
  32.                BDatabase   **dbList;        // Database handle array.
  33.                int           compIdxCnt;   // Count of mapped composite
  34.                keyMapdef    *keymap;          // indexes.
  35.            } engdef;
  36.  
  37. typedef struct {
  38.            char       errUser[MAXNAMELEN+1];  // Buffer used in getErrUser.
  39.            BEngine   *engH;                        // Engine object of database. 
  40.            int        handleCnt;                 // Number of cursors.
  41.            BCursor  **curList;                   // Cursor handle array. 
  42.            } dbdef;
  43.  
  44. typedef struct {
  45.            BDatabase *dbH;                  // Cursor's database object.
  46.            int        indexID;
  47.            BOOL       saveEveryChange;
  48.            int        handleCnt;           // Number of records in the cursor.
  49.            BRecord  **recList;            // Record handle array.
  50.            int        fieldCnt;       // Number of fields in the table.
  51.            FieldDesc far *desc;       // Field descriptor array in far heap.
  52.            char       indexName[DBIMAXNAMELEN];
  53.            char       indexTag[DBIMAXNAMELEN];
  54.            } curdef;
  55.  
  56. enum PXBlobState {blbClosed = 0, blbOpenRead=1, blbOpenWrite=2};
  57.  
  58. typedef struct {
  59.                FIELDNUMBER    fldnbr;       // Field number of BLOB in record,
  60.                                           // custom or generic. 
  61.                BLOBHANDLE     blbH;
  62.                BOOL           privateBlb; // Clone BLOB?; always true for 
  63.                                           // Write, may be true for Read.   
  64.                PXBlobState    state;      // Open or closed. 
  65.                RECORDHANDLE   blbRecH;     // Record handle of the record that
  66.                                           // owns the BLOB; used for case when
  67.                                           // when an application uses same 
  68.                                           // custom record with multiple 
  69.                                           // Paradox tables).     
  70.                } blbdef;   
  71.  
  72. typedef struct {
  73.            int          handleCnt;      // Number of elements in BLOB array.
  74.            blbdef      *recblb;         // BLOB handle array.
  75.            } recdef;
  76.                
  77. #endif
  78.  
  79.