OOFILE | Downloads | Purchasing | Press | Services | Company Information | Soapbox | References | F.A.Q. | HOME

OOFTST 7 - searching and sorting   

This this sample demonstrates searching and sorting by different types of fields, and how to parameterize calls, passing in table and field references. Most of the actual code is in ooftst07.h and this sample really just provides a working shell for it.


The include files are:

#include "oofile.h"	// the general oofile library
#define TEST_INDEXES
#include "ooftst07.h"	// the procedures for testing of fields
int main()
{
	cout << "OOFILE Validation Suite - Test 7\n"
		 << "Simple test to demonstrate comparative searches" << endl
		 << "using a database similar to ooftest2 but with lots of indexed fields" << endl; 

The following is a bit of complicated filename logic to support different backends with this one test program.
This code determines what platform we are running under and assigns a name for the database file accordingly.

	#ifdef TESTING_DBASE
		#ifdef _Macintosh
			const char* kExistsName =  ":ooftst07:People.dbf";
			const char* kDatabaseName = ":ooftst07:";
		#else
			const char* kExistsName =   "People.dbf"
			const char* kDatabaseName = "";
		#endif	  
	#else
		const char* kDatabaseName = "ooftst07.db";
		const char* kExistsName = kDatabaseName;
	#endif

Here is where we ask it to perform the procedures of testing -> these procedures are all in ooftst07.h

	doTest07(kExistsName, kDatabaseName);
	return EXIT_SUCCESS;
} 

 

Feature index

(c) Copyright A.D. Software 1994-2000 (All Rights Reserved).
Last Updated: 9th September 2001