Relations
Chapter Updated 06/17/25
| Method | Description | Parms |
|---|---|---|
| xbRelate( xbXBase *xbase ) | Constructor | Pointer to main xbase structure. |
| ~xbRelate() | Destructor | |
| xbInt16 AddRelation( xbDbf *dParent, const xbString &sParentExpression, xbDbf *dChild, xbIx *pChildIx, void *pChildTag, char cType = 'O', const xbString &sFilter = "" | Add a slave relation to a master table. |
xbDbf *dParent - Pointer to parent table const xbString &sParentExpression - parent expression, needs to match pChildTag xbDbf *dChild - Pointer to child table xbIx *pChildIx - Pointer to child index void *pChildTag - Pointer to child tag char cType = 'O' - O = Optional, R = required const xbString &sFilter = "" - optional child record filter. Placeholder for future functionality. Not tested in version 4.1.5 |
| xbInt16 AddRelation( xbDbf *dParent, const xbString &sParentExpression, xbDbf *dChild, xbIx *pChildIx, void *pChildTag, char cType = 'O', const xbString &sFilter = "" | Add a slave relation to a master table. |
xbDbf *dParent - Pointer to parent table const xbString &sParentExpression - parent expression, needs to match pChildTag xbDbf *dChild - Pointer to child table xbString &sChildTagName - Child Tag Name char cType = 'O' - O = Optional, R = required const xbString &sFilter = "" - optional child record filter. Placeholder for future functionality. Not tested in version 4.1.5 |
| xbInt16 CheckTblSts( xbDbf *d ) | Check status of given table for use in other relations. | Returns XB_ALREADY_DEFINED if table already allocated to other relationship structure. |
| void DumpRelationList() | Available if XB_DEBUG_SUPPORT option enabled. Dump internal structure of relationship list. The list is built from the tree and is used by the GetFirst,GetNext, GetPrev aand GetLast routines. | |
| void DumpRelationTree() | Available if XB_DEBUG_SUPPORT option enabled. Dump internal structure of relationship tree. The tree is initially built from the SetMaster() and AddRelation() routines. | |
| xbInt16 GetFirstRelRecord() | Return the first record for the defined relationship. | |
| xbInt16 GetLastRelRecord() | Return the last record for the defined relationship. | |
| xbInt16 GetNextRelRecord() | Return the next record for the defined relationship. | |
| xbInt16 GetPrevRelRecord() | Return the prev record for the defined relationship. | |
| xbInt16 SetMaster( xbDbf * d, const xbString &sFilter = "" ) | Set the master table for the relationship. Call this method first after constructing an xbRelation. |
xbDbf * d - Pointer to the master table const char *sFilter = "" - Optional filter. Placeholder for future functionality. Not tested in version 4.1.5 |
