|
|
C++ Example and Function List
C++ Example:
// List the MAILING.DBF data file ordered alphabetically by last name.
#include "d4all.hpp"
void main(void) {
Code4 codeBase; // Initialize CodeBase
Data4 mailing(codeBase, "MAILING"); // Open MAILING.DBF
Tag4 lastName(mailing, "LAST"); // Define an index tag object
mailing.select(lastName); // Select Last Name ordering
mailing.top(); // Go to top of mailing file
while(! mailing.eof()) {
cout << "\n" << mailing.recNo() << " "; // Display the record number
// For each field in the mailing file.
for (int j = 1; j <= mailing.numFields(); j++) {
Field4 field(mailing, j);
cout << field.str() << " "; // Display each field’s contents
}
mailing.skip(); // Skip to the next record
}
mailing.close();
}
CodeBase C++ Method List
Here are just a few of the 300 fully documented CodeBase C++ methods:
Data File Methods
| append |
eof |
lockFile |
reccount |
top |
| blank |
field |
lockGroup |
recno |
unlock |
| bottom |
flush |
numFields |
record |
write |
| close |
go |
open |
reindex |
zap |
| create |
index |
pack |
seek |
|
| data |
lock |
position |
skip |
|
| delete |
lockAppend |
recall |
tagSelect |
|
Field Methods
| assign |
changed |
lower |
number |
trim |
| assignDouble |
decimals |
maximum |
ptr |
true |
| assignField |
len |
name |
str |
type |
| assignLong |
lockCheck |
ncpy |
substr |
upper |
Index File Methods
| close |
data |
init |
open |
tag |
| create |
fileName |
isValid |
reindex |
tagAdd |
Linked List Methods
| add |
addAfter |
addBefore |
first |
init |
last |
| numNodes |
next |
pop |
prev |
remove |
|
Query & Join Methods
| bottom |
errorAction |
lockAddquerySet |
skip |
sortSet |
| changed |
init |
master |
skipEnable |
top |
Logging and Transaction Methods
| connect |
logFileName |
logOpenOff |
tranRollback |
tranStart |
| logCreate |
logOpen |
tranCommit |
tranStart |
tranStatus |
|
|