DeSR Dependency Parser

IXE::io::MappedFileView Class Reference

A mappedFile is an object that maps a file into memory (via the Unix system call mmap(2)) allowing it to be accessed via iterators. More...

#include <mappedFile.h>

Inheritance diagram for IXE::io::MappedFileView:

Inheritance graph

List of all members.

Public Types

typedef off64_t size_type
typedef
std::bidirectional_iterator_tag 
iterator_category
typedef char value_type
typedef ptrdiff_t difference_type
typedef value_type * pointer
typedef value_type & reference
typedef value_type const & const_reference
typedef value_type * iterator
typedef value_type const * const_iterator
typedef std::reverse_iterator
< char * > 
reverse_iterator
typedef const
std::reverse_iterator< char
const * > 
const_reverse_iterator

Public Member Functions

 MappedFileView (FileHandle *fh, off64_t offset, size_type size, std::ios::openmode mode=std::ios::in)
 MappedFileView (FileHandle *fh)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
bool open (FileHandle *fh, off64_t offset, size_type size, std::ios::openmode mode=std::ios::in)
void close ()
reference back ()
const_reference back () const
reference front ()
const_reference front () const
bool empty () const
size_type max_size () const
size_type size () const
reference operator[] (size_type i)
const_reference operator[] (size_type i) const

Protected Attributes

size_type size_
void * addr_
void * ptr_


Detailed Description

A mappedFile is an object that maps a file into memory (via the Unix system call mmap(2)) allowing it to be accessed via iterators.

Processing a file, especially files accessed randomly, is MUCH faster than standard I/O.

See also:
mmap(2)
W. Richard Stevens. "Advanced Programming in the Unix Environment," Addison-Wesley, Reading, MA, 1993. pp. 407-413

Definition at line 63 of file mappedFile.h.


The documentation for this class was generated from the following files:
 
Copyright © 2005-2007 G. Attardi. Generated on 13 Aug 2009 by doxygen 1.5.7.1.