peerplays-fc/include/fc/fstream.hpp
Daniel Larimer 3d56a96d4e major updates to stream,reflect,value,and json
- removed polymorphic reflection, made static_reflect default because
  there are cases such as deserializing an array that you need more
  information than the runtime reflection can provide such as the
  ability to resize arrays and know the array content type.

- refactored iostream, sstream, fstream to be much simpler, fewer
  indirections, and fixed getline.

- json parsing works using code from mace.
- value is reimplemented based upon mace::rpc::value and no longer uses
  the runtime reflection that was removed.

- moved the typename utility to its own header
2012-10-21 02:28:59 -04:00

43 lines
897 B
C++

#pragma once
#include <fc/fwd.hpp>
namespace fc {
class ofstream //: virtual public ostream {
public:
enum mode { out, binary };
ofstream();
ofstream( const fc::string& file, int m );
~ofstream();
void open( const fc::string& file, int m );
ofstream& write( const char* buf, size_t len );
void put( char c );
void close();
void flush();
private:
class impl;
fwd<impl,896> my;
};
class ifstream //: virtual public istream {
public:
enum mode { in, binary };
ifstream();
ifstream( const fc::string& file, int m );
~ifstream();
void open( const fc::string& file, int m );
ifstream& read( char* buf, size_t len );
void close();
void flush();
bool eof()const;
private:
class impl;
fwd<impl,904> my;
};
} // namespace fc