peerplays-fc/include/fc/sstream.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

44 lines
1.2 KiB
C++

#pragma once
#include <fc/iostream.hpp>
#include <fc/fwd.hpp>
namespace fc {
class stringstream : virtual public iostream {
public:
stringstream();
stringstream( fc::string& s);
~stringstream();
fc::string str();
virtual bool eof()const;
virtual ostream& write( const char* buf, size_t len );
virtual size_t readsome( char* buf, size_t len );
virtual istream& read( char* buf, size_t len );
virtual void close();
virtual void flush();
protected:
virtual istream& read( int64_t& );
virtual istream& read( uint64_t& );
virtual istream& read( int32_t& );
virtual istream& read( uint32_t& );
virtual istream& read( int16_t& );
virtual istream& read( uint16_t& );
virtual istream& read( int8_t& );
virtual istream& read( uint8_t& );
virtual istream& read( float& );
virtual istream& read( double& );
virtual istream& read( bool& );
virtual istream& read( char& );
virtual istream& read( fc::string& );
virtual ostream& write( const fc::string& );
private:
class impl;
fwd<impl,368> my;
};
}