• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

akregator

c4_FileStrategy Class Reference

#include <mk4io.h>

Inheritance diagram for c4_FileStrategy:

Inheritance graph
[legend]

List of all members.


Detailed Description

A file strategy encapsulates code dealing with all file I/O.

Definition at line 33 of file mk4io.h.


Public Member Functions

 c4_FileStrategy (FILE *file_=0)
virtual void DataCommit (t4_i32 newSize_)
virtual bool DataOpen (const char *fileName_, int mode_)
virtual int DataRead (t4_i32 pos_, void *buffer_, int length_)
virtual void DataWrite (t4_i32 pos_, const void *buffer_, int length_)
virtual t4_i32 FileSize ()
virtual t4_i32 FreshGeneration ()
virtual bool IsValid () const
virtual void ResetFileMapping ()
virtual ~c4_FileStrategy ()

Protected Attributes

FILE * _cleanup
FILE * _file

Constructor & Destructor Documentation

c4_FileStrategy::c4_FileStrategy ( FILE *  file_ = 0  ) 

Construct a new strategy object.

Definition at line 204 of file fileio.cpp.

c4_FileStrategy::~c4_FileStrategy (  )  [virtual]

Definition at line 209 of file fileio.cpp.


Member Function Documentation

void c4_FileStrategy::DataCommit ( t4_i32  newSize_  )  [virtual]

Flush and truncate file.

Reimplemented from c4_Strategy.

Definition at line 412 of file fileio.cpp.

bool c4_FileStrategy::DataOpen ( const char *  fileName_,
int  mode_ 
) [virtual]

Open a data file by name.

Definition at line 314 of file fileio.cpp.

int c4_FileStrategy::DataRead ( t4_i32  pos_,
void *  buffer_,
int  length_ 
) [virtual]

Read a number of bytes.

Reimplemented from c4_Strategy.

Definition at line 363 of file fileio.cpp.

void c4_FileStrategy::DataWrite ( t4_i32  pos_,
const void *  buffer_,
int  length_ 
) [virtual]

Write a number of bytes, return true if successful.

Reimplemented from c4_Strategy.

Definition at line 372 of file fileio.cpp.

t4_i32 c4_FileStrategy::FileSize (  )  [virtual]

Report total size of the datafile.

Reimplemented from c4_Strategy.

Definition at line 224 of file fileio.cpp.

t4_i32 c4_FileStrategy::FreshGeneration (  )  [virtual]

Return a good value to use as fresh generation counter.

Reimplemented from c4_Strategy.

Definition at line 242 of file fileio.cpp.

bool c4_FileStrategy::IsValid (  )  const [virtual]

True if we can do I/O with this object.

Reimplemented from c4_Strategy.

Definition at line 220 of file fileio.cpp.

void c4_FileStrategy::ResetFileMapping (  )  [virtual]

Support for memory-mapped files.

Reimplemented from c4_Strategy.

Definition at line 247 of file fileio.cpp.


Member Data Documentation

FILE* c4_FileStrategy::_cleanup [protected]

Pointer to same file object, if it must be deleted at end.

Definition at line 61 of file mk4io.h.

FILE* c4_FileStrategy::_file [protected]

Pointer to file object.

Definition at line 59 of file mk4io.h.


The documentation for this class was generated from the following files:
  • mk4io.h
  • fileio.cpp

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal