jigdo API

util/bstream.hh File Reference

I/O streams for bytes (byte is unsigned char, not regular char). More...

#include <config.h>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <debug.hh>

Go to the source code of this file.


Typedefs

typedef istream bistream
typedef ostream bostream
typedef iostream biostream
typedef ifstream bifstream
typedef ofstream bofstream
typedef fstream bfstream

Functions

bistreamreadBytes (bistream &s, byte *buf, streamsize count)
biostreamreadBytes (biostream &s, byte *buf, streamsize count)
bostreamwriteBytes (bostream &s, const byte *buf, streamsize count)
biostreamwriteBytes (biostream &s, const byte *buf, streamsize count)

Detailed Description

I/O streams for bytes (byte is unsigned char, not regular char).

This was first solved with typedefs like "typedef basic_istream<byte> bistream;". That turns out to be difficult, though, since you need to supply your own implementation for char_traits and basic_fstream. The current typedefs aren't very useful except to indicate in the source: "This is /intended/ to be used for binary data, not text".


Typedef Documentation

typedef fstream bfstream

typedef ifstream bifstream

typedef iostream biostream

typedef istream bistream

typedef ofstream bofstream

typedef ostream bostream


Function Documentation

biostream& readBytes ( biostream s,
byte *  buf,
streamsize  count 
) [inline]

bistream& readBytes ( bistream s,
byte *  buf,
streamsize  count 
) [inline]

biostream& writeBytes ( biostream s,
const byte *  buf,
streamsize  count 
) [inline]

bostream& writeBytes ( bostream s,
const byte *  buf,
streamsize  count 
) [inline]


Generated on Tue Sep 23 14:27:42 2008 for jigdo by  doxygen 1.5.6