mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Enumerations | Functions
io.h File Reference
#include <iosfwd>
#include <limits>
#include <string>
#include "../common.h"

Go to the source code of this file.

Namespaces

 mf
 

Enumerations

enum  mf::line_delimitor { mf::line_delimitor::unknown, mf::line_delimitor::LF, mf::line_delimitor::CR, mf::line_delimitor::CRLF }
 

Functions

line_delimitor mf::detect_line_delimitor (std::istream &, std::size_t max_offset=512)
 Detects line delimitor used in given file. More...
 
void mf::read_line (std::istream &str, std::string &line, line_delimitor ld)
 
void mf::skip_line (std::istream &str, line_delimitor ld)
 
void mf::write_line (std::ostream &str, const std::string &line, line_delimitor ld)
 
void mf::end_line (std::ostream &str, line_delimitor ld)
 
void mf::flip_endianness (byte *data, std::size_t sz)
 
template<typename T >
void mf::flip_endianness (T &t)
 
std::size_t mf::file_size (const std::string &filename)
 
std::size_t mf::file_size (std::ifstream &stream)