NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
CFileReaderWriter Class Reference

Search Toolkit Book for CFileReaderWriter

#include <corelib/ncbifile.hpp>

+ Inheritance diagram for CFileReaderWriter:
+ Collaboration diagram for CFileReaderWriter:

Public Member Functions

 CFileReaderWriter (const string &filename, EOpenMode open_mode=eOpen, EShareMode share_mode=eShareRead)
 Construct CFileReaderWriter for reading/writing to/from the file with name 'filename'. More...
 
 CFileReaderWriter (const char *filename, EOpenMode open_mode=eOpen, EShareMode share_mode=eShareRead)
 
 CFileReaderWriter (TFileHandle handle)
 Construct CFileReaderWriter for writing to system handle 'handle'. More...
 
virtual ERW_Result Read (void *buf, size_t count, size_t *bytes_read=0)
 Virtual methods from IReaderWriter. More...
 
virtual ERW_Result PendingCount (size_t *count)
 Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking. More...
 
virtual ERW_Result Write (const void *buf, size_t count, size_t *bytes_written=0)
 Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device. More...
 
virtual ERW_Result Flush (void)
 Flush pending data (if any) down to the output device. More...
 
- Public Member Functions inherited from IReaderWriter
virtual ~IReaderWriter ()
 
- Public Member Functions inherited from IReader
virtual ERW_Result Pushback (const void *buf, size_t count, void *del_ptr=0)
 This method gets called by RStream buffer destructor to return buffered yet still unread (from the stream) portion of data back to the device. More...
 
virtual ~IReader ()
 
- Public Member Functions inherited from IWriter
virtual ~IWriter ()
 
- Public Member Functions inherited from CFileReaderWriter_Base
 CFileReaderWriter_Base (void)
 Default constructor. More...
 
TFileHandle GetFileHandle (void)
 Return system file handle associated with the file. More...
 
CFileIOGetFileIO (void)
 Get an underlaying file I/O object. More...
 

Static Public Member Functions

static IReaderWriterNew (const string &filename, EOpenMode open_mode=eOpen, EShareMode share_mode=eShareRead)
 Return a new IReaderWriter object corresponding to the given filename. More...
 

Private Member Functions

 CFileReaderWriter (const CFileReaderWriter &)
 
void operator= (const CFileReaderWriter &)
 

Additional Inherited Members

- Public Types inherited from CFileIO_Base
enum  EOpenMode {
  eCreate , eCreateNew , eOpen , eOpenAlways ,
  eTruncate
}
 File open mode. More...
 
enum  EAccessMode { eRead , eWrite , eReadWrite }
 Which I/O operations permitted on the file. More...
 
enum  EShareMode { eShareRead , eShareWrite , eShare , eExclusive }
 Sharing mode for opened file. More...
 
enum  EPositionMoveMethod { eBegin , eCurrent , eEnd }
 Which starting point to use for the moves of the file pointer. More...
 
- Protected Attributes inherited from CFileReaderWriter_Base
CFileIO m_File
 

Detailed Description

Definition at line 3693 of file ncbifile.hpp.


The documentation for this class was generated from the following files:
Modified on Sat Feb 24 07:47:27 2024 by modify_doxy.py rev. 669887