Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Namespaces | Functions
CommonIO.h File Reference
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <array>
#include <list>
#include <memory>
#include <vector>
#include <sstream>
#include <string>
#include <iostream>
#include <chrono>
#include "Common.h"
#include "CommonData.h"
#include "Base64.h"
Include dependency graph for CommonIO.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dev::StreamOut< S, T >
 
struct  dev::StreamOut< S, uint8_t >
 

Namespaces

 dev
 Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by RenĂ© Nyffenegger.
 

Functions

std::string dev::getPassword (std::string const &_prompt)
 Requests the user to enter a password on the console. More...
 
bytes dev::contents (std::string const &_file)
 Retrieve and returns the contents of the given file. More...
 
bytesSec dev::contentsSec (std::string const &_file)
 Secure variation. More...
 
std::string dev::contentsString (std::string const &_file)
 Retrieve and returns the contents of the given file as a std::string. More...
 
bytesRef dev::contentsNew (std::string const &_file, bytesRef _dest=bytesRef())
 Retrieve and returns the allocated contents of the given file; if is given, don't allocate, use it directly. More...
 
void dev::writeFile (std::string const &_file, bytesConstRef _data, bool _writeDeleteRename=false)
 Write the given binary data into the given file, replacing the file if it pre-exists. More...
 
void dev::writeFile (std::string const &_file, bytes const &_data, bool _writeDeleteRename=false)
 Write the given binary data into the given file, replacing the file if it pre-exists. More...
 
void dev::writeFile (std::string const &_file, std::string const &_data, bool _writeDeleteRename=false)
 
std::string dev::memDump (bytes const &_bytes, unsigned _width=8, bool _html=false)
 Nicely renders the given bytes to a string, optionally as HTML. More...
 
std::ostream & dev::operator<< (std::ostream &_out, bytes const &_e)
 
template<class T >
std::ostream & dev::operator<< (std::ostream &_out, std::vector< T > const &_e)
 
template<class T , std::size_t Z>
std::ostream & dev::operator<< (std::ostream &_out, std::array< T, Z > const &_e)
 
template<class T , class U >
std::ostream & dev::operator<< (std::ostream &_out, std::pair< T, U > const &_e)
 
template<class T >
std::ostream & dev::operator<< (std::ostream &_out, std::list< T > const &_e)
 
template<class T1 , class T2 , class T3 >
std::ostream & dev::operator<< (std::ostream &_out, std::tuple< T1, T2, T3 > const &_e)
 
template<class T , class U >
std::ostream & dev::operator<< (std::ostream &_out, std::map< T, U > const &_e)
 
template<class T , class U >
std::ostream & dev::operator<< (std::ostream &_out, std::unordered_map< T, U > const &_e)
 
template<class T , class U >
std::ostream & dev::operator<< (std::ostream &_out, std::set< T, U > const &_e)
 
template<class T , class U >
std::ostream & dev::operator<< (std::ostream &_out, std::unordered_set< T, U > const &_e)
 
template<class T , class U >
std::ostream & dev::operator<< (std::ostream &_out, std::multimap< T, U > const &_e)
 
template<class _S , class _T >
_S & dev::operator<< (_S &_out, std::shared_ptr< _T > const &_p)
 
template<class T >
std::string dev::toString (std::chrono::time_point< T > const &_e, std::string _format="%F %T")
 
template<class S , class T >
Sdev::streamout (S &_out, std::vector< T > const &_e)
 
template<class S , class T , std::size_t Z>
Sdev::streamout (S &_out, std::array< T, Z > const &_e)
 
template<class S , class T >
Sdev::streamout (S &_out, std::list< T > const &_e)
 
template<class S , class T , class U >
Sdev::streamout (S &_out, std::pair< T, U > const &_e)
 
template<class S , class T1 , class T2 , class T3 >
Sdev::streamout (S &_out, std::tuple< T1, T2, T3 > const &_t)
 
template<class S , class T , class U >
Sdev::streamout (S &_out, std::map< T, U > const &_v)
 
template<class S , class T , class U >
Sdev::streamout (S &_out, std::unordered_map< T, U > const &_v)
 
template<class S , class T >
Sdev::streamout (S &_out, std::set< T > const &_v)
 
template<class T >
std::ostream & dev::operator<< (std::ostream &_out, std::set< T > const &_e)
 
template<class S , class T >
Sdev::streamout (S &_out, std::unordered_set< T > const &_v)
 
template<class T >
std::ostream & dev::operator<< (std::ostream &_out, std::unordered_set< T > const &_e)
 
template<class S , class T >
Sdev::streamout (S &_out, std::multiset< T > const &_v)
 
template<class T >
std::ostream & dev::operator<< (std::ostream &_out, std::multiset< T > const &_e)
 
template<class S , class T , class U >
Sdev::streamout (S &_out, std::multimap< T, U > const &_v)
 
template<class _T >
std::string dev::toString (_T const &_t)
 Converts arbitrary value to string representation using std::stringstream. More...
 

Detailed Description

Author
Gav Wood i@gav.nosp@m.wood.nosp@m..com
Date
2014

File & stream I/O routines.

Definition in file CommonIO.h.