TAO  2.3.3
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
TAO::Storable_Base Class Referenceabstract

#include <Storable_Base.h>

Inheritance diagram for TAO::Storable_Base:
Inheritance graph
[legend]

Public Types

enum  Storable_State { goodbit = 0, badbit = 1, eofbit = 2, failbit = 4 }
 

Public Member Functions

 Storable_Base (bool use_backup)
 
virtual ~Storable_Base ()
 
bool use_backup ()
 
void remove ()
 
virtual int create_backup ()=0
 
virtual int exists ()=0
 
virtual int open ()=0
 
virtual int close ()=0
 
virtual int flock (int whence, int start, int len)=0
 
virtual int funlock (int whence, int start, int len)=0
 
virtual time_t last_changed (void)=0
 
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
 
virtual void rewind (void)=0
 
virtual bool flush (void)=0
 
virtual int sync (void)=0
 
virtual Storable_Baseoperator<< (const ACE_CString &str)=0
 
virtual Storable_Baseoperator>> (ACE_CString &str)=0
 
virtual Storable_Baseoperator<< (int i)=0
 
virtual Storable_Baseoperator>> (int &i)=0
 
virtual Storable_Baseoperator<< (unsigned int i)=0
 
virtual Storable_Baseoperator>> (unsigned int &i)=0
 
virtual Storable_Baseoperator<< (const TAO_OutputCDR &cdr)=0
 
virtual size_t write (size_t size, const char *bytes)=0
 
virtual size_t read (size_t size, char *bytes)=0
 
virtual int restore_backup ()=0
 

Static Public Member Functions

static ACE_CString state_as_string (Storable_State state)
 

Static Public Attributes

static bool use_backup_default = false
 

Protected Member Functions

virtual void do_remove ()=0
 
virtual void remove_backup ()=0
 If a backup file exists, remove it. More...
 

Protected Attributes

bool use_backup_
 

Private Attributes

Storable_State state_
 

Member Enumeration Documentation

enum TAO::Storable_Base::Storable_State
Enumerator
goodbit 
badbit 
eofbit 
failbit 

Constructor & Destructor Documentation

TAO::Storable_Base::Storable_Base ( bool  use_backup)
TAO::Storable_Base::~Storable_Base ( )
virtual

Member Function Documentation

bool TAO::Storable_Base::bad ( void  ) const
void TAO::Storable_Base::clear ( Storable_State  state = goodbit)
virtual int TAO::Storable_Base::close ( )
pure virtual
virtual int TAO::Storable_Base::create_backup ( )
pure virtual
virtual void TAO::Storable_Base::do_remove ( )
protectedpure virtual
bool TAO::Storable_Base::eof ( void  ) const
virtual int TAO::Storable_Base::exists ( )
pure virtual
bool TAO::Storable_Base::fail ( void  ) const
virtual int TAO::Storable_Base::flock ( int  whence,
int  start,
int  len 
)
pure virtual
virtual bool TAO::Storable_Base::flush ( void  )
pure virtual
virtual int TAO::Storable_Base::funlock ( int  whence,
int  start,
int  len 
)
pure virtual
bool TAO::Storable_Base::good ( void  ) const
virtual time_t TAO::Storable_Base::last_changed ( void  )
pure virtual
virtual int TAO::Storable_Base::open ( )
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator<< ( const ACE_CString str)
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator<< ( int  i)
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator<< ( unsigned int  i)
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator<< ( const TAO_OutputCDR cdr)
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator>> ( ACE_CString str)
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator>> ( int &  i)
pure virtual
virtual Storable_Base& TAO::Storable_Base::operator>> ( unsigned int &  i)
pure virtual
TAO::Storable_Base::Storable_State TAO::Storable_Base::rdstate ( void  ) const
virtual size_t TAO::Storable_Base::read ( size_t  size,
char *  bytes 
)
pure virtual
void TAO::Storable_Base::remove ( void  )

Remove the file that is assumed to not be open. If backup are used, the backup will also be removed.

virtual void TAO::Storable_Base::remove_backup ( )
protectedpure virtual

If a backup file exists, remove it.

Implemented in TAO::Storable_FlatFileStream.

virtual int TAO::Storable_Base::restore_backup ( )
pure virtual
virtual void TAO::Storable_Base::rewind ( void  )
pure virtual
void TAO::Storable_Base::setstate ( Storable_State  state)
ACE_CString TAO::Storable_Base::state_as_string ( Storable_State  state)
static
virtual int TAO::Storable_Base::sync ( void  )
pure virtual

Force write of storable data to storage. Returns 0 on success, otherwise EOF

Implemented in TAO::Storable_FlatFileStream.

bool TAO::Storable_Base::use_backup ( )
virtual size_t TAO::Storable_Base::write ( size_t  size,
const char *  bytes 
)
pure virtual

Member Data Documentation

Storable_State TAO::Storable_Base::state_
private
bool TAO::Storable_Base::use_backup_
protected
bool TAO::Storable_Base::use_backup_default = false
static

The process-wide default policy for doing a backup when close () is called. The backup can then be restored if restore_backup () is called. The initial value for the default is false.


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