📄 skpr.txt
字号:
CAM Technical Systems
CTS 1991-1992
Presents :
SKIPPER version 1.15c
Flat File Database API
for C++
DOS/Windows DLL
Borland C++ version 3.0
is a registered trademark
of Borland International
Skipper is copyrighted intellectual
Property of CTS - CAM Technical Systems
and Cannot be reproduced,reverse engineered,
or used in any manner that is inconsistent with
the limited license that is granted to registered
users with out the express written consent of CTS.
Table of Contents:
Introductions ................................2
Librarys and Data Integrity ..................2
System Design and Implementation .............3
Registration .................................4
Features and Functions:
Master Contrutctor .................5
OpenDB .............................5
Master Destructor ..................6
CloseDB ............................6
Insert .............................7
LookUp .............................8
Extract ............................8
CheckInserts .......................9
Remove .............................10
Delete .............................11
GetNext ............................12
GetPrev ............................12
StepNext ...........................12
StepPrev ...........................12
Align ..............................13
PackDB .............................13
State ..............................14
ClearState .........................14
Switch Functions :
NoDuplicates
Duplicates
PackOff
PackOn
AlignOff
AlignOn .......................15
Version ............................16
VERROR .............................16
Disclaimer and Help ................17
Error Codes ........................18
Introduction :
The SKIPPER system is a C++ implementation of a flat
file database manager for the individual who needs an easy
to use versatile Platform to build a C++ application that
requires access to a database. SKIPPER is a powerful OOP
model that allows the programmer to create or use pre-
existing files as database platforms. The only requirement
for an existing file to be used as a SKIPPER file is.
1] The file must be in a flat format and contain only
Records of a consistent length.
2] The file must contain a key field and the file must
be in ascending sequential order by that key field.
If the file is to be created by SKIPPER these details
can be overlooked as SKIPPER will handle the sequencing of
the keys.
Libraries :
SKIPPER is comprised of a series of libraries SKIPPER[s
c m l h] relating to the memory model of the application
that is being designed. To use the SKIPPER libraries
include in any source modules that will access the skipper
system the include file :
"SKIPPER.H"
If using the IDE and a project file include the correct
SKIPPER library file for the memory model being used in the
application. If using the command line compiler include the
library file for the correct memory model in the link step.
Data Integrity :
It is important to understand that with the flat file
model used in skipper the integrity of the database is only
as good as the programmer that writes a SKIPPER application.
The functionality and Integrity of the data in a
SKIPPER database are controlled by the original
specifications of the data contained in the file(s) used by
skipper. If an application program creates a database that
doesn't allow duplicate key values and the same file is used
in another application that does and a Duplicate key gets
inserted into the data stream.
The integrity of the original database application has
been violated. As long as the SKIPPER API rules for
creation and use of a data file are followed and a database
is closed correctly after each use the integrity of the data
will be maintained by SKIPPER. If the Integrity of a
SKIPPER database is violated the resulting violation can
cause missed extractions and other related data retrieval
errors. Future versions of SKIPPER will control the
integrity of the database more closely with the addition of
external file definition records and the like.
NOTE: Version 2.0 will improve on integrity with DBMS
control files and other security measures.
Supported Compilers :
SKIPPER version 1.15c was engineered, written and
tested on the Borland C++ version 3 compiler and has not
been tested in any other environments(due to the cost of
obtaining various vendors compilers). The source code for
SKIPPER was written to be as compatible as possible with
other vendors products based on the authors experience with
the other vendors products. SKIPPER does have dependance on
certain 'C' and 'C++' library functions contained in the
Borland C++ package the functions are as listed.
- memcpy(void *source,void *dest,size).
- memcmp(void *source1,void *source2,size).
- fstream and related stream functions.
Any problems that arise with the use of the SKIPPER
system or suggestions for future releases or any other
contructive criticism can be directed as follows.
BUFFALO CREEK BBS
message to : Craig McNiel
515-225-8496 (8-N-1)
or
CAM Technical Systems
Route #1 Box #3
Batavia, IA 52533-9701
Phone: (515)662-2507
NOTICE : SKIPPER can not be interfaced with 'C' source due
to C++ name mangling. A registered user could create a 'C'
version with a little effort but , a 'C' version is not
currently planned.
Registration : SKIPPER system is copyrighted software and
is distributed under the SHAREWARE concept. If you find
the SKIPPER database manager useful or use the SKIPPER
system in an application or for anything other than
evaluation purposes please register your copy. With your
registration you will receive the following.
1. The most recent version of the SKIPPER system.
2. FREE unlimited technical support (not that it
won't be provided during the trial period).
3. The chance to voice your opinion and an suggestions
you would like to see in the next revision.
(Unregistered users have NO say).
4. FREE minor upgrades and LOW COST major upgrades.
5. All memory models and DLL's and any other existing
SKIPPER support material.
Support the shareware concept and register by filling out
the registration form REGISTER.DOC by typing :
TYPE REGISTER.DOC >PRN
at the command line and then mail the completed form with
the registration fee of $35.00 in U.S. funds (NO CASH
PLEASE!!) to :
CAM Technical Systems
Route #1 Box #3
Batavia, IA 52533-9701.
Thank you for your support.
SKIPPER FEATURES ,FUNCTIONS and SPECIFICATIONS :
The current version of SKIPPER version 1.15c consists
of 25 different functions excluding the constructor and
destructor for SKIPPER. The class name for all of the
SKIPPER functions that are user callable is "Master". The
SKIPPER system also has provisions for a verbose error
message system that aids in debugging Applications using the
SKIPPER system.
Currently SKIPPER requires the following for operation.
* DOS 2.1 or Higher.
* Free Disk space equal to the largest Database.
* Borland C++ or compatible compiler.
SKIPPER FUNCTIONS :
Master::OpenDB(char *filename,int RecordSize,
int KeyOffset,int KeyLength)
and
Master::Master(char *filename,int RecordSize,
int KeyOffset,int KeyLength)
Purpose :
To create a Master object and open a SKIPPER file or to
open a SKIPPER file for a pre-created Master object.
Parameters:
char *filename - Pointer to valid DOS filename of the
SKIPPER database.
int RecordSize - Unsigned length of the entire record.
int KeyOffset - Unsigned 0 based offset from the
beginning of each record.
int KeyLength - Length of the records key in bytes.
Specifications :
Currently the SKIPPER systems include file that the
system itself is compliled with contains define statements
that must match certain parameters of the functions. These
parameters are the RECORDSIZE,and KEYLENGTH. If the
parameters don't match the system will report an error and
halt execution of the application.
Note : The SHAREWARE version is configured for 80 byte
records. These limitations can easily be over come by
registering.
Master::CloseDB(void)
and
Master::~Master()
Purpose :
These functions systematically shut down the SKIPPER
system and maintain the integrity of the database. If a
user wants to Open another Database a quick call the
CloseDB() function will allow another database to be opened
by the Master Object as long as it falls within the
parameters the Object was created under . (Key length,
Record size) using smaller values will not endanger data
integrity when passing parameters on opening the database.
Parameters :
None.
Specifications :
The Libraries that are the SKIPPER system were and can
be compiled using different MAXIMUM parameters. These
parameters can not be exceeded when opening a database but
they can be smaller values. The only define statement that
cannot be altered at runtime is the MAXINSERTIONS which
controls the number of consecutive insertions that are
allowed before the queue is full and the database must be
"ALIGNED" or placed in ascending sequential key order. All
other parameters can be overridden upon opening or calling
the SKIPPER constructor.
Master::Insert(void *Record)
Purpose :
Insert is used to add another record to a database.
Insert is a queued operation and is very fast. When an
insert operation passes beyond the maximum number of
insertions allowed the database is "ALIGNED" which involves
making the database into one contiguous file that has the
key fields in ascending sequential order. If the
NoDuplicates function has been called the Insert function
first checks to see if the records key exists before
insertion. If the key does exist the function returns an
error and the insertion is aborted.
Parameters :
void *Record - A pointer to the area in storage that
the record is stored. The Key is
extracted from the Record.
Specifications :
The insert function places a record at the end of the
database until the database is ALIGNED. The database is
aligned automatically when a record is retrieved or when the
database passes the maximum number of insertions.
The key that is used in the insert function is grabbed
out of the record that is pointed to by void *Record.
Depending on if Duplicated keys are allowed or not the
insert function will check for a duplicate prior to
insertion and fail if a duplicate is found.
Master::LookUp(char *key,void *Record)
and
Master::Extract(char *key,void *Record)
Purpose:
These two functions are used to retrieve records from
the database. The only difference is the method used to
search for the record. The LookUp function uses a linear
search from the front to the back. and Extract uses a Binary
search from the middle out. The main different is speed.
LookUp is slower the longer the database is and the further
to the end the record is contained. The advantage is that a
LookUp doesn't require the overhead of an alignment to
extract a record. Extract on the other hand is very fast
but the records must be aligned. If an insertion or
deletion has occurred prior to calling Extract the database
will be aligned and/or packed prior to the search beginning.
Parameters :
char *key - Pointer to a field containing the
key value of the record to be
returned.
void *Record - A pointer to an area in storage for
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -