Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members

# TAO_NS_FlatFileStream Class Reference

`#include <Flat_File_Persistence.h>`

Inheritance diagram for TAO_NS_FlatFileStream:

[legend]
Collaboration diagram for TAO_NS_FlatFileStream:

[legend]
List of all members.

## Public Methods

| TAO_NS_FlatFileStream (const ACE_CString &file, const char *mode)
virtual | ~TAO_NS_FlatFileStream ()
virtual void | remove ()
| Remove a file by name (file is not open).
virtual int | exists ()
| Check if a file exists on disk (file is not open).
virtual int | open ()
| Open a file (the remaining methods below all require an open file).
virtual int | close ()
| Close an open file.
virtual int | flock (int whence, int start, int len)
| Acquire a file lock.
virtual int | funlock (int whence, int start, int len)
| Release a file lock.
virtual time_t | last_changed (void)
| Returns the last time an open file was changed.
virtual TAO_Storable_Base & | operator<< (const TAO_NS_Persistence_Header &header)
| Write a header to disk.
virtual TAO_Storable_Base & | operator>> (TAO_NS_Persistence_Header &header)
| Read a header from disk.
virtual TAO_Storable_Base & | operator<< (const TAO_NS_Persistence_Record &record)
| Write a record to disk.
virtual TAO_Storable_Base & | operator>> (TAO_NS_Persistence_Record &record)
| Read a record from disk.
virtual TAO_Storable_Base & | operator<< (const TAO_NS_Persistence_Global &global)
| Write the global data to disk.
virtual TAO_Storable_Base & | operator>> (TAO_NS_Persistence_Global &global)
| Read the global data from disk.

## Private Attributes

ACE_OS::ace_flock_t | filelock_
FILE * | fl_
ACE_CString | file_
ACE_CString | mode_

## Constructor & Destructor Documentation

TAO_NS_FlatFileStream::TAO_NS_FlatFileStream | ( | const ACE_CString & | file,
|  | const char * | mode
| ) |

TAO_NS_FlatFileStream::~TAO_NS_FlatFileStream | ( |  | ) | `[virtual]`

## Member Function Documentation

int TAO_NS_FlatFileStream::close | ( |  | ) | `[virtual]`

| Close an open file. Implements TAO_Storable_Base.

int TAO_NS_FlatFileStream::exists | ( |  | ) | `[virtual]`

| Check if a file exists on disk (file is not open). Implements TAO_Storable_Base.

int TAO_NS_FlatFileStream::flock | ( | int | whence,
|  | int | start,
|  | int | len
| ) | `[virtual]`

| Acquire a file lock. Implements TAO_Storable_Base.

int TAO_NS_FlatFileStream::funlock | ( | int | whence,
|  | int | start,
|  | int | len
| ) | `[virtual]`

| Release a file lock. Implements TAO_Storable_Base.

time_t TAO_NS_FlatFileStream::last_changed | ( | void |  | ) | `[virtual]`

| Returns the last time an open file was changed. Implements TAO_Storable_Base.

int TAO_NS_FlatFileStream::open | ( |  | ) | `[virtual]`

| Open a file (the remaining methods below all require an open file). Implements TAO_Storable_Base.

TAO_Storable_Base & TAO_NS_FlatFileStream::operator<< | ( | const TAO_NS_Persistence_Global & | global | ) | `[virtual]`

| Write the global data to disk. Implements TAO_Storable_Base.

TAO_Storable_Base & TAO_NS_FlatFileStream::operator<< | ( | const TAO_NS_Persistence_Record & | record | ) | `[virtual]`

| Write a record to disk. Implements TAO_Storable_Base.

TAO_Storable_Base & TAO_NS_FlatFileStream::operator<< | ( | const TAO_NS_Persistence_Header & | header | ) | `[virtual]`

| Write a header to disk. Implements TAO_Storable_Base.

TAO_Storable_Base & TAO_NS_FlatFileStream::operator>> | ( | TAO_NS_Persistence_Global & | global | ) | `[virtual]`

| Read the global data from disk. Implements TAO_Storable_Base.

TAO_Storable_Base & TAO_NS_FlatFileStream::operator>> | ( | TAO_NS_Persistence_Record & | record | ) | `[virtual]`

| Read a record from disk. Implements TAO_Storable_Base.

TAO_Storable_Base & TAO_NS_FlatFileStream::operator>> | ( | TAO_NS_Persistence_Header & | header | ) | `[virtual]`

| Read a header from disk. Implements TAO_Storable_Base.

void TAO_NS_FlatFileStream::remove | ( |  | ) | `[virtual]`

| Remove a file by name (file is not open). Implements TAO_Storable_Base.

## Member Data Documentation

ACE_CString TAO_NS_FlatFileStream::file_`[private]`

ACE_OS::ace_flock_t TAO_NS_FlatFileStream::filelock_`[private]`

FILE* TAO_NS_FlatFileStream::fl_`[private]`

ACE_CString TAO_NS_FlatFileStream::mode_`[private]`

The documentation for this class was generated from the following files:

- Flat_File_Persistence.h
- Flat_File_Persistence.cpp