TAO
2.3.3
|
A Storable_Base derived class that works with a file stream. More...
#include <Storable_FlatFileStream.h>
Public Member Functions | |
Storable_FlatFileStream (const ACE_CString &file, const char *mode, bool use_backup=Storable_Base::use_backup_default) | |
virtual | ~Storable_FlatFileStream () |
virtual int | exists () |
Check if a file exists on disk (file is not open) More... | |
virtual int | open () |
Open a file (the remaining methods below all require an open file) More... | |
virtual int | close () |
Acquire a file lock. More... | |
virtual int | flock (int whence, int start, int len) |
Acquire a file lock. More... | |
virtual int | funlock (int whence, int start, int len) |
Release a file lock. More... | |
virtual time_t | last_changed (void) |
Returns the last time an open file was changed. More... | |
virtual void | rewind (void) |
virtual bool | flush (void) |
virtual int | sync (void) |
virtual Storable_Base & | operator<< (const ACE_CString &str) |
virtual Storable_Base & | operator>> (ACE_CString &str) |
virtual Storable_Base & | operator<< (int i) |
virtual Storable_Base & | operator>> (int &i) |
virtual Storable_Base & | operator<< (unsigned int i) |
virtual Storable_Base & | operator>> (unsigned int &i) |
virtual Storable_Base & | operator<< (const TAO_OutputCDR &cdr) |
virtual size_t | write (size_t size, const char *bytes) |
virtual size_t | read (size_t size, char *bytes) |
virtual int | restore_backup () |
Public Member Functions inherited from TAO::Storable_Base | |
Storable_Base (bool use_backup) | |
virtual | ~Storable_Base () |
bool | use_backup () |
void | remove () |
void | clear (Storable_State state=goodbit) |
void | setstate (Storable_State state) |
Storable_State | rdstate (void) const |
bool | good (void) const |
bool | bad (void) const |
bool | eof (void) const |
bool | fail (void) const |
Protected Member Functions | |
virtual void | do_remove () |
virtual void | remove_backup () |
If a backup file exists, remove it. More... | |
virtual int | create_backup () |
Private Member Functions | |
void | throw_on_read_error (Storable_State state) |
void | throw_on_write_error (Storable_State state) |
ACE_CString | backup_file_name () |
Private Attributes | |
ACE_OS::ace_flock_t | filelock_ |
FILE * | fl_ |
ACE_CString | file_ |
ACE_CString | mode_ |
Additional Inherited Members | |
Public Types inherited from TAO::Storable_Base | |
enum | Storable_State { goodbit = 0, badbit = 1, eofbit = 2, failbit = 4 } |
Static Public Member Functions inherited from TAO::Storable_Base | |
static ACE_CString | state_as_string (Storable_State state) |
Static Public Attributes inherited from TAO::Storable_Base | |
static bool | use_backup_default = false |
Protected Attributes inherited from TAO::Storable_Base | |
bool | use_backup_ |
A Storable_Base derived class that works with a file stream.
TAO::Storable_FlatFileStream::Storable_FlatFileStream | ( | const ACE_CString & | file, |
const char * | mode, | ||
bool | use_backup = Storable_Base::use_backup_default |
||
) |
|
virtual |
|
private |
|
virtual |
Acquire a file lock.
Implements TAO::Storable_Base.
|
protectedvirtual |
Implements TAO::Storable_Base.
|
protectedvirtual |
Implements TAO::Storable_Base.
|
virtual |
Check if a file exists on disk (file is not open)
Implements TAO::Storable_Base.
|
virtual |
Acquire a file lock.
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Release a file lock.
Implements TAO::Storable_Base.
|
virtual |
Returns the last time an open file was changed.
Implements TAO::Storable_Base.
|
virtual |
Open a file (the remaining methods below all require an open file)
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
protectedvirtual |
If a backup file exists, remove it.
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Implements TAO::Storable_Base.
|
virtual |
Force write of storable data to storage. Returns 0 on success, otherwise EOF
Implements TAO::Storable_Base.
|
private |
Throw a Storable_Read_Exception if the state is not good due to a read error.
|
private |
Throw a Storable_Write_Exception if the state is not good due to a write error.
|
virtual |
Implements TAO::Storable_Base.
|
private |
|
private |
|
private |
|
private |