| Vowpal Wabbit
    | 
#include <io_buf.h>
 
  
 | Public Member Functions | |
| void | verify_hash (bool verify) | 
| uint32_t | hash () | 
| virtual int | open_file (const char *name, bool stdin_off) | 
| virtual int | open_file (const char *name, bool stdin_off, int flag=READ) | 
| virtual void | reset_file (int f) | 
| io_buf () | |
| virtual | ~io_buf () | 
| void | set (char *p) | 
| virtual size_t | num_files () | 
| virtual ssize_t | read_file (int f, void *buf, size_t nbytes) | 
| ssize_t | fill (int f) | 
| virtual ssize_t | write_file (int f, const void *buf, size_t nbytes) | 
| virtual void | flush () | 
| virtual bool | close_file () | 
| virtual bool | compressed () | 
| void | close_files () | 
| void | buf_write (char *&pointer, size_t n) | 
| size_t | buf_read (char *&pointer, size_t n) | 
| size_t | bin_read_fixed (char *data, size_t len, const char *read_message) | 
| size_t | bin_write_fixed (const char *data, size_t len) | 
| Static Public Member Functions | |
| static ssize_t | read_file_or_socket (int f, void *buf, size_t nbytes) | 
| static ssize_t | write_file_or_socket (int f, const void *buf, size_t nbytes) | 
| static void | close_file_or_socket (int f) | 
| static bool | is_socket (int f) | 
| Public Attributes | |
| v_array< char > | space | 
| v_array< int > | files | 
| size_t | count | 
| size_t | current | 
| char * | head | 
| v_array< char > | currentname | 
| v_array< char > | finalname | 
| Static Public Attributes | |
| static constexpr int | READ = 1 | 
| static constexpr int | WRITE = 2 | 
| Private Attributes | |
| bool | _verify_hash | 
| uint32_t | _hash | 
| Static Private Attributes | |
| static constexpr size_t | INITIAL_BUFF_SIZE = 1 << 16 | 
| 
 | inline | 
Definition at line 147 of file io_buf.h.
References v_array< T >::begin(), and v_array< T >::resize().
| 
 | inlinevirtual | 
| 
 | inline | 
Definition at line 230 of file io_buf.h.
References buf_read(), THROW, and uniform_hash().
Referenced by bin_read(), bin_text_read_write_fixed(), save_load(), save_load_flat_example(), save_load_header(), GD::save_load_online_state(), GD::save_load_regressor(), save_load_regularizer(), and save_load_sampling().
| 
 | inline | 
Definition at line 252 of file io_buf.h.
References buf_write(), isbinary(), readto(), and uniform_hash().
Referenced by audit_regressor_feature(), audit_regressor_lda(), bin_text_write(), bin_text_write_fixed(), bin_write(), and save_load_flat_example().
| size_t io_buf::buf_read | ( | char *& | pointer, | 
| size_t | n | ||
| ) | 
Definition at line 12 of file io_buf.cc.
References v_array< T >::begin(), current, v_array< T >::end(), files, fill(), head, v_array< T >::size(), and space.
Referenced by bin_read_fixed(), MULTILABEL::bufread_label(), CB::bufread_label(), COST_SENSITIVE::bufread_label(), close_files(), read_cached_features(), MULTICLASS::read_cached_label(), CCB::read_cached_label(), MULTILABEL::read_cached_label(), CB::read_cached_label(), COST_SENSITIVE::read_cached_label(), CB_EVAL::read_cached_label(), and read_cached_simple_label().
| void io_buf::buf_write | ( | char *& | pointer, | 
| size_t | n | ||
| ) | 
Definition at line 94 of file io_buf.cc.
References v_array< T >::begin(), v_array< T >::end(), v_array< T >::end_array, flush(), head, v_array< T >::resize(), and space.
Referenced by bin_write_fixed(), MULTICLASS::cache_label(), MULTILABEL::cache_label(), CB::cache_label(), COST_SENSITIVE::cache_label(), CCB::cache_label(), CB_EVAL::cache_label(), cache_simple_label(), cache_tag(), close_files(), output_byte(), and output_features().
| 
 | inlinevirtual | 
Reimplemented in memory_io_buf, and comp_io_buf.
Definition at line 204 of file io_buf.h.
References close_file_or_socket(), v_array< T >::empty(), and v_array< T >::pop().
Referenced by close_files(), dump_regressor(), end_examples(), load_input_model(), parse_cache(), parse_dictionary_argument(), parse_mask_regressor_args(), parse_sources(), and reset_source().
| 
 | static | 
Definition at line 152 of file io_buf.cc.
References is_socket().
Referenced by close_file(), compressed(), VW::finish(), and reset_source().
| 
 | inline | 
Definition at line 218 of file io_buf.h.
References buf_read(), buf_write(), close_file(), and is_socket().
Referenced by finalize_source().
| 
 | inlinevirtual | 
Reimplemented in comp_io_buf.
Definition at line 214 of file io_buf.h.
References close_file_or_socket().
Referenced by reset_source().
| 
 | inline | 
Definition at line 171 of file io_buf.h.
References v_array< T >::begin(), v_array< T >::end(), v_array< T >::end_array, read_file(), and v_array< T >::resize().
Referenced by buf_read(), isbinary(), and readto().
| 
 | inlinevirtual | 
Reimplemented in comp_io_buf.
Definition at line 194 of file io_buf.h.
References v_array< T >::begin(), v_array< T >::empty(), and write_file().
Referenced by buf_write(), dump_regressor(), end_examples(), reset_source(), and send_features().
| 
 | inline | 
| 
 | static | 
Definition at line 116 of file io_buf.cc.
Referenced by close_file_or_socket(), close_files(), read_file_or_socket(), and write_file_or_socket().
| 
 | inlinevirtual | 
Reimplemented in comp_io_buf.
Definition at line 165 of file io_buf.h.
References v_array< T >::size().
Referenced by reset_source().
| 
 | inlinevirtual | 
Definition at line 90 of file io_buf.h.
References open_file().
Referenced by dump_regressor(), enable_sources(), make_write_cache(), open_file(), parse_cache(), parse_dictionary_argument(), parse_mask_regressor_args(), read_regressor_file(), and reset_source().
| 
 | inlinevirtual | 
Reimplemented in comp_io_buf.
Definition at line 92 of file io_buf.h.
References O_LARGEFILE, v_array< T >::push_back(), READ, THROWERRNO, and WRITE.
| 
 | inlinevirtual | 
Reimplemented in memory_io_buf, and comp_io_buf.
Definition at line 167 of file io_buf.h.
References f, and read_file_or_socket().
Referenced by cache_numbits(), fill(), hash_file_contents(), and parse_dictionary_argument().
| 
 | static | 
| 
 | inlinevirtual | 
Reimplemented in comp_io_buf.
Definition at line 136 of file io_buf.h.
References v_array< T >::begin(), and v_array< T >::end().
Referenced by reset_source().
| 
 | inline | 
Definition at line 163 of file io_buf.h.
Referenced by cache_tag(), output_byte(), output_features(), and read_cached_features().
| 
 | inline | 
| 
 | inlinevirtual | 
Reimplemented in memory_io_buf, and comp_io_buf.
Definition at line 190 of file io_buf.h.
References write_file_or_socket().
Referenced by flush(), and make_write_cache().
| 
 | static | 
Definition at line 140 of file io_buf.cc.
References is_socket().
Referenced by active_print_result(), confidence_print_result(), CB_ADF::global_print_newline(), CSOAA::global_print_newline(), ACTION_SCORE::print_action_score(), CCB::print_decision_scores(), print_raw_text(), print_result(), MWT::print_scalars(), and write_file().
| size_t io_buf::count | 
Definition at line 65 of file io_buf.h.
Referenced by enable_sources().
| size_t io_buf::current | 
Definition at line 66 of file io_buf.h.
Referenced by buf_read(), enable_sources(), isbinary(), readto(), and reset_source().
| v_array<char> io_buf::currentname | 
Definition at line 68 of file io_buf.h.
Referenced by free_parser(), make_write_cache(), and reset_source().
| v_array<int> io_buf::files | 
Definition at line 64 of file io_buf.h.
Referenced by buf_read(), comp_io_buf::close_file(), enable_sources(), end_examples(), finalize_source(), isbinary(), make_write_cache(), comp_io_buf::open_file(), open_sockets(), readto(), reset_source(), SVRG::save_load(), MWT::save_load(), MARGINAL::save_load(), GD::save_load(), save_load(), save_load_header(), memory_tree_ns::save_load_memory_tree(), save_load_sampling(), save_load_svm_model(), save_load_tree(), recall_tree_ns::save_load_tree(), and sender::~sender().
| v_array<char> io_buf::finalname | 
Definition at line 69 of file io_buf.h.
Referenced by free_parser(), make_write_cache(), and reset_source().
| char* io_buf::head | 
Definition at line 67 of file io_buf.h.
Referenced by buf_read(), buf_write(), comp_io_buf::flush(), isbinary(), readto(), comp_io_buf::reset_file(), and sync_queries().
| 
 | staticprivate | 
| 
 | static | 
Definition at line 71 of file io_buf.h.
Referenced by enable_sources(), comp_io_buf::open_file(), open_file(), parse_cache(), parse_dictionary_argument(), parse_mask_regressor_args(), read_regressor_file(), and reset_source().
| v_array<char> io_buf::space | 
Definition at line 62 of file io_buf.h.
Referenced by buf_read(), buf_write(), comp_io_buf::flush(), isbinary(), parse_cache(), readto(), comp_io_buf::reset_file(), save_load_header(), sync_queries(), and sender::~sender().
| 
 | static | 
Definition at line 72 of file io_buf.h.
Referenced by audit_regressor_setup(), dump_regressor(), make_write_cache(), comp_io_buf::open_file(), and open_file().
 1.8.13
 1.8.13