Set of functions, and objects to perform binary IO. More...
#include <iosfwd>#include <string>#include <fstream>#include <map>#include <utility>#include <vxl_config.h>#include <vsl/vsl_export.h>Go to the source code of this file.
Classes | |
| class | vsl_b_ostream |
| A binary output adaptor for any std::ostream. More... | |
| class | vsl_b_ofstream |
| An adapter for a std::ofstream to make it suitable for binary IO. More... | |
| class | vsl_b_istream |
| An adaptor for any std::istream to make it suitable for binary input. More... | |
| class | vsl_b_ifstream |
| An adapter for a std::ifstream to make it suitable for binary IO. More... | |
Macros | |
| #define | VCL_64BIT_ATTR /* */ |
Functions | |
| bool | vsl_b_istream_test (std::istream &is) |
| Test to see if a stream really is a binary vsl file. More... | |
| void | vsl_b_write (vsl_b_ostream &os, bool b) |
| Write bool to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, bool &b) |
| Read bool from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, bool b) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, char n) |
| Write char to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, char &n) |
| Read char from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, char n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, signed char n) |
| Write signed char to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, signed char &n) |
| Read signed char from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, signed char n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, unsigned char n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, unsigned char &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, unsigned char n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, const std::string &n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, std::string &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, const std::string &n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, const char *s) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, char *s) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, const char *s) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, int VCL_64BIT_ATTR n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, int VCL_64BIT_ATTR &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, int VCL_64BIT_ATTR n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, unsigned int n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, unsigned int &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, unsigned int n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, short n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, short &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, short n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, unsigned short n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, unsigned short &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, unsigned short n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, long n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, long &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, long n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, unsigned long n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, unsigned long &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, unsigned long n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, float n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, float &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, float n) |
| Print to a stream. More... | |
| void | vsl_b_write (vsl_b_ostream &os, double n) |
| Write to vsl_b_ostream. More... | |
| void | vsl_b_read (vsl_b_istream &is, double &n) |
| Read from vsl_b_istream. More... | |
| void | vsl_print_summary (std::ostream &os, double n) |
| Print to a stream. More... | |
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(std::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 326 of file vsl_binary_io.h.
| bool vsl_b_istream_test | ( | std::istream & | is | ) |
Test to see if a stream really is a binary vsl file.
Definition at line 471 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 168 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 87 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 98 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 110 of file vsl_binary_io.cxx.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| std::string & | n | ||
| ) |
Read from vsl_b_istream.
Definition at line 126 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 150 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.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| short & | n | ||
| ) |
Read from vsl_b_istream.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| unsigned short & | n | ||
| ) |
Read from vsl_b_istream.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| long & | n | ||
| ) |
Read from vsl_b_istream.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| unsigned long & | n | ||
| ) |
Read from vsl_b_istream.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| float & | n | ||
| ) |
Read from vsl_b_istream.
Definition at line 181 of file vsl_binary_io.cxx.
| void vsl_b_read | ( | vsl_b_istream & | is, |
| double & | n | ||
| ) |
Read from vsl_b_istream.
Definition at line 193 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 160 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 82 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 93 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 105 of file vsl_binary_io.cxx.
| void vsl_b_write | ( | vsl_b_ostream & | os, |
| const std::string & | n | ||
| ) |
Write to vsl_b_ostream.
Definition at line 117 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 138 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.
| void vsl_b_write | ( | vsl_b_ostream & | os, |
| short | n | ||
| ) |
Write to vsl_b_ostream.
| void vsl_b_write | ( | vsl_b_ostream & | os, |
| unsigned short | n | ||
| ) |
Write to vsl_b_ostream.
| void vsl_b_write | ( | vsl_b_ostream & | os, |
| long | n | ||
| ) |
Write to vsl_b_ostream.
| void vsl_b_write | ( | vsl_b_ostream & | os, |
| unsigned long | n | ||
| ) |
Write to vsl_b_ostream.
| 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 175 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 187 of file vsl_binary_io.cxx.
|
inline |
Print to a stream.
Definition at line 264 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 272 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 280 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 288 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 296 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 308 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 334 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 344 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 352 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 360 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 368 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 376 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 409 of file vsl_binary_io.h.
|
inline |
Print to a stream.
Definition at line 418 of file vsl_binary_io.h.
1.8.15