Functions
core/vsl/vsl_quick_file.h File Reference

Functions for quickly loading and saving binary files. More...

#include <vcl_string.h>
#include <vcl_iostream.h>
#include <vcl_cerrno.h>
#include <vsl/vsl_binary_io.h>

Go to the source code of this file.

Functions

template<class T >
bool vsl_quick_file_load (T &data, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
 Load something from a file.
template<class T >
bool vsl_quick_file_save (const T &data, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
 Save something to a file.
template<class T , class S >
bool vsl_quick_file_load (T &data1, S &data2, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S >
bool vsl_quick_file_save (const T &data1, const S &data2, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U >
bool vsl_quick_file_load (T &data1, S &data2, U &data3, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U >
bool vsl_quick_file_save (const T &data1, const S &data2, const U &data3, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U , class V >
bool vsl_quick_file_load (T &data1, S &data2, U &data3, V &data4, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U , class V >
bool vsl_quick_file_save (const T &data1, const S &data2, const U &data3, const V &data4, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U , class V , class W >
bool vsl_quick_file_load (T &data1, S &data2, U &data3, V &data4, W &data5, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U , class V , class W >
bool vsl_quick_file_save (const T &data1, const S &data2, const U &data3, const V &data4, const W &data5, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U , class V , class W , class X >
bool vsl_quick_file_load (T &data1, S &data2, U &data3, V &data4, W &data5, X &data6, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)
template<class T , class S , class U , class V , class W , class X >
bool vsl_quick_file_save (const T &data1, const S &data2, const U &data3, const V &data4, const W &data5, const X &data6, const vcl_string &path, vcl_ostream *errorStream=&vcl_cerr)

Detailed Description

Functions for quickly loading and saving binary files.

Author:
Ian Scott

All the functions return true if successful. The functions will also output a success or failure message to stderr by default, although you may substitute any vcl_ostream, or (vcl_ostream*)0 to avoid the message.

For these templated functions to work, the object must have vsl_b_read and vsl_b_write functions defined for them

Definition in file vsl_quick_file.h.


Function Documentation

template<class T >
bool vsl_quick_file_load ( T &  data,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Load something from a file.

Definition at line 25 of file vsl_quick_file.h.

template<class T , class S >
bool vsl_quick_file_load ( T &  data1,
S &  data2,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 80 of file vsl_quick_file.h.

template<class T , class S , class U >
bool vsl_quick_file_load ( T &  data1,
S &  data2,
U &  data3,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 140 of file vsl_quick_file.h.

template<class T , class S , class U , class V >
bool vsl_quick_file_load ( T &  data1,
S &  data2,
U &  data3,
V &  data4,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 200 of file vsl_quick_file.h.

template<class T , class S , class U , class V , class W >
bool vsl_quick_file_load ( T &  data1,
S &  data2,
U &  data3,
V &  data4,
W &  data5,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 262 of file vsl_quick_file.h.

template<class T , class S , class U , class V , class W , class X >
bool vsl_quick_file_load ( T &  data1,
S &  data2,
U &  data3,
V &  data4,
W &  data5,
X &  data6,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 327 of file vsl_quick_file.h.

template<class T >
bool vsl_quick_file_save ( const T &  data,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Save something to a file.

Definition at line 56 of file vsl_quick_file.h.

template<class T , class S >
bool vsl_quick_file_save ( const T &  data1,
const S &  data2,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 114 of file vsl_quick_file.h.

template<class T , class S , class U >
bool vsl_quick_file_save ( const T &  data1,
const S &  data2,
const U &  data3,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 173 of file vsl_quick_file.h.

template<class T , class S , class U , class V >
bool vsl_quick_file_save ( const T &  data1,
const S &  data2,
const U &  data3,
const V &  data4,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 234 of file vsl_quick_file.h.

template<class T , class S , class U , class V , class W >
bool vsl_quick_file_save ( const T &  data1,
const S &  data2,
const U &  data3,
const V &  data4,
const W &  data5,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 297 of file vsl_quick_file.h.

template<class T , class S , class U , class V , class W , class X >
bool vsl_quick_file_save ( const T &  data1,
const S &  data2,
const U &  data3,
const V &  data4,
const W &  data5,
const X &  data6,
const vcl_string &  path,
vcl_ostream *  errorStream = &vcl_cerr 
) [inline]

Definition at line 363 of file vsl_quick_file.h.