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

§ IoEncoding

Enumerator
NO_ENCODING 
BASE_64 
HEX 

Definition at line 48 of file io.hpp.

Function Documentation

§ load() [1/2]

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.

§ load() [2/2]

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.

§ save() [1/2]

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().

§ save() [2/2]

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().