| ost::ThreadFile(3) | Library Functions Manual | ost::ThreadFile(3) |
NAME¶
ost::ThreadFile - This class defines a database I/O file service that can be shared by multiple threads.SYNOPSIS¶
#include <file.h> Inherits ost::RandomFile.Public Member Functions¶
ThreadFile (const char *path)
Additional Inherited Members¶
Detailed Description¶
This class defines a database I/O file service that can be shared by multiple threads.David Sugar dyfet@ostel.com This class defines
a database I/O file service that can be shared by multiple threads.
Constructor & Destructor Documentation¶
ost::ThreadFile::ThreadFile (const char *path)¶
Open or create a new database file. You should also use Initial. Parameters:path pathname of database to
open.
virtual ost::ThreadFile::~ThreadFile () [virtual]¶
Close and finish a database file.Member Function Documentation¶
Error ost::ThreadFile::append (caddr_taddress = NULL, ccxx_size_tlength = 0)¶
Add new data to the end of the file. Parameters:address address to use, or NULL if same
as last I/O.
length length to use, or 0 if same as last I/O.
Error ost::ThreadFile::fetch (caddr_taddress = NULL, ccxx_size_tlength = 0, off_tposition = -1)¶
Fetch a portion of the file into physical memory. This can use state information to fetch the current record multiple times. Returns:errSuccess on success.
Parameters:
address address to use, or NULL if same
as last I/O.
length length to use, or 0 if same as last I/O.
position file position to use -1 if same as last I/O.
off_t ost::ThreadFile::getPosition (void)¶
Fetch the current file position marker for this thread. Returns:file position offset.
bool ost::ThreadFile::operator++ (void)¶
bool ost::ThreadFile::operator-- (void)¶
Error ost::ThreadFile::restart (void) [virtual]¶
Restart an existing database; close and re-open. Returns:errSuccess if successful.
Error ost::ThreadFile::update (caddr_taddress = NULL, ccxx_size_tlength = 0, off_tposition = -1)¶
Update a portion of a file from physical memory. This can use state information to commit the last read record. Returns:errSuccess on success.
Parameters:
address address to use, or NULL if same
as last I/O.
length length to use, or 0 if same as last I/O.
position file position to use or -1 if same as last I/O.
Author¶
Generated automatically by Doxygen for GNU CommonC++ from the source code.| Sat Jun 23 2012 | GNU CommonC++ |