ndn-cxx: NDN C++ Library 0.9.0-33-g832ea91d
Loading...
Searching...
No Matches
io.hpp File Reference
#include "ndn-cxx/encoding/block.hpp"
#include "ndn-cxx/util/concepts.hpp"
#include <fstream>
+ Include dependency graph for io.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ndn::io::Error
 

Namespaces

namespace  ndn
 
namespace  ndn::io
 
namespace  ndn::io::detail
 

Enumerations

enum  ndn::io::IoEncoding {
  ndn::io::NO_ENCODING ,
  ndn::io::BASE64 ,
  ndn::io::HEX
}
 Indicates how a file or stream of bytes is encoded. More...
 

Functions

template<typename T >
shared_ptr< T > ndn::io::load (const std::string &filename, IoEncoding encoding=BASE64)
 Reads a TLV element from a file.
 
template<typename T >
shared_ptr< T > ndn::io::load (std::istream &is, IoEncoding encoding=BASE64)
 Reads a TLV element from a stream.
 
shared_ptr< Bufferndn::io::loadBuffer (std::istream &is, IoEncoding encoding=BASE64)
 Reads bytes from a stream until EOF.
 
template<typename T >
ndn::io::loadTlv (std::istream &is, IoEncoding encoding=BASE64)
 Reads a TLV element of type T from a stream.
 
template<typename T >
void ndn::io::save (const T &obj, const std::string &filename, IoEncoding encoding=BASE64)
 Writes a TLV element to a file.
 
template<typename T >
void ndn::io::save (const T &obj, std::ostream &os, IoEncoding encoding=BASE64)
 Writes a TLV element to a stream.
 
void ndn::io::saveBuffer (span< const uint8_t > buf, std::ostream &os, IoEncoding encoding=BASE64)
 Writes a sequence of bytes to a stream.