Set of functions, and objects to perform binary IO. More...
#include <vcl_iosfwd.h>
#include <vcl_string.h>
#include <vcl_fstream.h>
#include <vcl_map.h>
#include <vcl_utility.h>
#include <vxl_config.h>
Go to the source code of this file.
Classes | |
class | vsl_b_ostream |
A binary output adaptor for any vcl_ostream. More... | |
class | vsl_b_ofstream |
An adapter for a vcl_ofstream to make it suitable for binary IO. More... | |
class | vsl_b_istream |
An adaptor for any vcl_istream to make it suitable for binary input. More... | |
class | vsl_b_ifstream |
An adapter for a vcl_ifstream to make it suitable for binary IO. More... | |
Defines | |
#define | VCL_64BIT_ATTR |
Functions | |
bool | vsl_b_istream_test (vcl_istream &is) |
Test to see if a stream really is a binary vsl file. | |
void | vsl_b_write (vsl_b_ostream &os, bool b) |
Write bool to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, bool &b) |
Read bool from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, bool b) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, char n) |
Write char to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, char &n) |
Read char from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, char n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, signed char n) |
Write signed char to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, signed char &n) |
Read signed char from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, signed char n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, unsigned char n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, unsigned char &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, unsigned char n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, const vcl_string &n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, vcl_string &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, const vcl_string &n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, const char *s) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, char *s) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, const char *s) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, int VCL_64BIT_ATTR n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, int VCL_64BIT_ATTR &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, int VCL_64BIT_ATTR n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, unsigned int n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, unsigned int &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, unsigned int n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, short n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, short &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, short n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, unsigned short n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, unsigned short &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, unsigned short n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, long n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, long &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, long n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, unsigned long n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, unsigned long &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, unsigned long n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, float n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, float &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, float n) |
Print to a stream. | |
void | vsl_b_write (vsl_b_ostream &os, double n) |
Write to vsl_b_ostream. | |
void | vsl_b_read (vsl_b_istream &is, double &n) |
Read from vsl_b_istream. | |
void | vsl_print_summary (vcl_ostream &os, double n) |
Print to a stream. |
Set of functions, and objects to perform binary IO.
You should include this file if you want to do binary_io
Also included are a set of functions vsl_print_summary(vcl_ostream& os, bool b) for basic types to ensure that templated classes vsl_print_summaries can work with all types
Definition in file vsl_binary_io.h.
#define VCL_64BIT_ATTR |
Definition at line 320 of file vsl_binary_io.h.
bool vsl_b_istream_test | ( | vcl_istream & | is | ) |
Test to see if a stream really is a binary vsl file.
Definition at line 711 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
bool & | b | ||
) |
Read bool from vsl_b_istream.
Definition at line 102 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
char & | n | ||
) |
Read char from vsl_b_istream.
Definition at line 24 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
signed char & | n | ||
) |
Read signed char from vsl_b_istream.
Definition at line 34 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
unsigned char & | n | ||
) |
Read from vsl_b_istream.
Definition at line 45 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
vcl_string & | n | ||
) |
Read from vsl_b_istream.
Definition at line 60 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
char * | s | ||
) |
Read from vsl_b_istream.
s
for expected length of string. This function is easy to crash mith a malformed data file. Definition at line 84 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
int VCL_64BIT_ATTR & | n | ||
) |
Read from vsl_b_istream.
void vsl_b_read | ( | vsl_b_istream & | is, |
unsigned int & | n | ||
) |
Read from vsl_b_istream.
Definition at line 146 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
short & | n | ||
) |
Read from vsl_b_istream.
Definition at line 175 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
unsigned short & | n | ||
) |
Read from vsl_b_istream.
Definition at line 204 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
long & | n | ||
) |
Read from vsl_b_istream.
Definition at line 233 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
unsigned long & | n | ||
) |
Read from vsl_b_istream.
Definition at line 261 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
float & | n | ||
) |
Read from vsl_b_istream.
Definition at line 419 of file vsl_binary_io.cxx.
void vsl_b_read | ( | vsl_b_istream & | is, |
double & | n | ||
) |
Read from vsl_b_istream.
Definition at line 431 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
bool | b | ||
) |
Write bool to vsl_b_ostream.
Definition at line 94 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
char | n | ||
) |
Write char to vsl_b_ostream.
Definition at line 19 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
signed char | n | ||
) |
Write signed char to vsl_b_ostream.
Definition at line 29 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
unsigned char | n | ||
) |
Write to vsl_b_ostream.
Definition at line 40 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
const vcl_string & | n | ||
) |
Write to vsl_b_ostream.
Definition at line 51 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
const char * | s | ||
) |
Write to vsl_b_ostream.
Definition at line 72 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
int VCL_64BIT_ATTR | n | ||
) |
Write to vsl_b_ostream.
void vsl_b_write | ( | vsl_b_ostream & | os, |
unsigned int | n | ||
) |
Write to vsl_b_ostream.
Definition at line 138 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
short | n | ||
) |
Write to vsl_b_ostream.
Definition at line 168 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
unsigned short | n | ||
) |
Write to vsl_b_ostream.
Definition at line 196 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
long | n | ||
) |
Write to vsl_b_ostream.
Definition at line 226 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
unsigned long | n | ||
) |
Write to vsl_b_ostream.
Definition at line 253 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
float | n | ||
) |
Write to vsl_b_ostream.
Number is saved with ANSI/IEEE Standard 754-1985 single precision.
Definition at line 413 of file vsl_binary_io.cxx.
void vsl_b_write | ( | vsl_b_ostream & | os, |
double | n | ||
) |
Write to vsl_b_ostream.
Number is saved with ANSI/IEEE Standard 754-1985 double precision.
Definition at line 425 of file vsl_binary_io.cxx.
void vsl_print_summary | ( | vcl_ostream & | os, |
bool | b | ||
) | [inline] |
Print to a stream.
Definition at line 258 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
char | n | ||
) | [inline] |
Print to a stream.
Definition at line 266 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
signed char | n | ||
) | [inline] |
Print to a stream.
Definition at line 274 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
unsigned char | n | ||
) | [inline] |
Print to a stream.
Definition at line 282 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
const vcl_string & | n | ||
) | [inline] |
Print to a stream.
Definition at line 290 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
const char * | s | ||
) | [inline] |
Print to a stream.
Definition at line 302 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
int VCL_64BIT_ATTR | n | ||
) | [inline] |
Print to a stream.
Definition at line 328 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
unsigned int | n | ||
) | [inline] |
Print to a stream.
Definition at line 338 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
short | n | ||
) | [inline] |
Print to a stream.
Definition at line 346 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
unsigned short | n | ||
) | [inline] |
Print to a stream.
Definition at line 354 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
long | n | ||
) | [inline] |
Print to a stream.
Definition at line 362 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
unsigned long | n | ||
) | [inline] |
Print to a stream.
Definition at line 370 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
float | n | ||
) | [inline] |
Print to a stream.
Definition at line 411 of file vsl_binary_io.h.
void vsl_print_summary | ( | vcl_ostream & | os, |
double | n | ||
) | [inline] |
Print to a stream.
Definition at line 420 of file vsl_binary_io.h.