Vowpal Wabbit
Classes | Macros | Functions
io_buf.h File Reference
#include <cstddef>
#include <iostream>
#include <sstream>
#include <vector>
#include <memory>
#include <cassert>
#include <cstdlib>
#include "v_array.h"
#include "hash.h"
#include "io/io_adapter.h"
#include "vw_exception.h"

Classes

class  io_buf
 

Macros

#define writeit(what, str)
 
#define writeitvar(what, str, mywhat)
 

Functions

size_t bin_read (io_buf &i, char *data, size_t len, const char *read_message)
 
size_t bin_write (io_buf &o, const char *data, uint32_t len)
 
size_t bin_text_write (io_buf &io, char *data, size_t len, std::stringstream &msg, bool text)
 
size_t bin_text_read_write (io_buf &io, char *data, size_t len, const char *read_message, bool read, std::stringstream &msg, bool text)
 
size_t bin_text_write_fixed (io_buf &io, char *data, size_t len, std::stringstream &msg, bool text)
 
size_t bin_text_read_write_fixed (io_buf &io, char *data, size_t len, const char *read_message, bool read, std::stringstream &msg, bool text)
 
size_t bin_text_read_write_fixed_validated (io_buf &io, char *data, size_t len, const char *read_message, bool read, std::stringstream &msg, bool text)
 

Macro Definition Documentation

#define writeit (   what,
  str 
)
Value:
do \
{ \
msg << str << " = " << what << " "; \
bin_text_read_write_fixed(model_file, (char*)&what, sizeof(what), "", read, msg, text); \
} while (0);
size_t bin_text_read_write_fixed(io_buf &io, char *data, size_t len, const char *read_message, bool read, std::stringstream &msg, bool text)
Definition: io_buf.h:340
#define writeitvar (   what,
  str,
  mywhat 
)
Value:
auto mywhat = (what); \
do \
{ \
msg << str << " = " << mywhat << " "; \
bin_text_read_write_fixed(model_file, (char*)&mywhat, sizeof(mywhat), "", read, msg, text); \
} while (0);
size_t bin_text_read_write_fixed(io_buf &io, char *data, size_t len, const char *read_message, bool read, std::stringstream &msg, bool text)
Definition: io_buf.h:340

Function Documentation

size_t bin_read ( io_buf i,
char *  data,
size_t  len,
const char *  read_message 
)
inline
size_t bin_text_read_write ( io_buf io,
char *  data,
size_t  len,
const char *  read_message,
bool  read,
std::stringstream &  msg,
bool  text 
)
inline
size_t bin_text_read_write_fixed ( io_buf io,
char *  data,
size_t  len,
const char *  read_message,
bool  read,
std::stringstream &  msg,
bool  text 
)
inline
size_t bin_text_read_write_fixed_validated ( io_buf io,
char *  data,
size_t  len,
const char *  read_message,
bool  read,
std::stringstream &  msg,
bool  text 
)
inline
size_t bin_text_write ( io_buf io,
char *  data,
size_t  len,
std::stringstream &  msg,
bool  text 
)
inline
size_t bin_text_write_fixed ( io_buf io,
char *  data,
size_t  len,
std::stringstream &  msg,
bool  text 
)
inline
size_t bin_write ( io_buf o,
const char *  data,
uint32_t  len 
)
inline