NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::io Namespace Reference

Classes

class  Error
 

Enumerations

enum  IoEncoding { NO_ENCODING, BASE_64, HEX }
 

Functions

template<typename T >
shared_ptr< T > load (std::istream &is, IoEncoding encoding=BASE_64)
 
template<typename T >
shared_ptr< T > load (const std::string &file, IoEncoding encoding=BASE_64)
 
template<typename T >
void save (const T &object, std::ostream &os, IoEncoding encoding=BASE_64)
 
template<typename T >
void save (const T &object, const std::string &file, IoEncoding encoding=BASE_64)
 

Enumeration Type Documentation

Enumerator
NO_ENCODING 
BASE_64 
HEX 

Definition at line 48 of file io.hpp.

Function Documentation

template<typename T >
shared_ptr<T> ndn::io::load ( std::istream &  is,
IoEncoding  encoding = BASE_64 
)

Definition at line 56 of file io.hpp.

References BASE_64, HEX, and NO_ENCODING.

template<typename T >
shared_ptr<T> ndn::io::load ( const std::string &  file,
IoEncoding  encoding = BASE_64 
)

Definition at line 107 of file io.hpp.

template<typename T >
void ndn::io::save ( const T &  object,
std::ostream &  os,
IoEncoding  encoding = BASE_64 
)

Definition at line 115 of file io.hpp.

References BASE_64, ndn::io::Error::Error(), HEX, NO_ENCODING, ndn::Block::size(), and ndn::Block::wire().

Referenced by save().

template<typename T >
void ndn::io::save ( const T &  object,
const std::string &  file,
IoEncoding  encoding = BASE_64 
)

Definition at line 165 of file io.hpp.

References save().