PLearn 0.1
Classes | Namespaces | Defines | Functions
PStream.h File Reference
#include <map>
#include <set>
#include <sstream>
#include <fstream>
#include <limits>
#include <plearn/base/byte_order.h>
#include <plearn/base/pl_hash_fun.h>
#include <plearn/base/plerror.h>
#include <plearn/base/pl_stdint.h>
#include "PStream_util.h"
#include "PStreamBuf.h"
#include "StdPStreamBuf.h"
Include dependency graph for PStream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PLearn::chkUnsigned< x >
struct  PLearn::chkUnsigned< true >
class  PLearn::PStream
class  PLearn::PIFStream
class  PLearn::POFStream
class  PLearn::PIStringStream

Namespaces

namespace  PLearn
 

< for swap


Defines

#define PSTREAM_BUF_SIZE   100
 The size of the temporary buffer to use inside some class function.

Functions

PStream & PLearn::get_pin ()
PStream & PLearn::get_pout ()
PStream & PLearn::get_pio ()
PStream & PLearn::get_perr ()
PStream & PLearn::get_pnull ()
PStream & PLearn::flush (PStream &out)
PStream & PLearn::endl (PStream &out)
PStream & PLearn::ws (PStream &in)
string PLearn::pgetline (PStream &in)
 returns the next line read from the stream, after removing any trailing '\r' and/or '\n'
template<class T >
PStream & PLearn::operator>> (PStream &in, T *&x)
template<class T >
PStream & PLearn::operator<< (PStream &out, T const *const &x)
template<class T >
PStream & PLearn::operator>> (PStream &in, const T *&x)
template<class T >
PStream & PLearn::operator>> (PStream &in, PP< T > &o)
template<class T >
PStream & PLearn::operator<< (PStream &out, const PP< T > &o)
template<class T >
PStream & PLearn::operator<< (PStream &out, T *&ptr)
template<class A , class B >
PStream & PLearn::operator<< (PStream &out, const pair< A, B > &x)
template<typename S , typename T >
PStream & PLearn::operator>> (PStream &in, pair< S, T > &x)
template<class MapT >
void PLearn::writeMap (PStream &out, const MapT &m)
template<class MapT >
void PLearn::readMap (PStream &in, MapT &m)
PStream & PLearn::operator>> (PStream &in, CopiesMap &)
PStream & PLearn::operator<< (PStream &out, const CopiesMap &)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator<< (PStream &out, const map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator>> (PStream &in, map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator<< (PStream &out, const multimap< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator>> (PStream &in, multimap< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator<< (PStream &out, const hash_map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator>> (PStream &in, hash_map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator<< (PStream &out, const hash_multimap< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStream & PLearn::operator>> (PStream &in, hash_multimap< Key, Value, Compare, Alloc > &m)
template<class Iterator >
void PLearn::binwrite_ (PStream &out, Iterator it, unsigned int n)
 Serialization of sequences.
void PLearn::binwrite_ (PStream &out, const bool *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const char *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, char *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const signed char *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, signed char *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const unsigned char *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, unsigned char *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const short *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, short *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const unsigned short *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, unsigned short *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const int *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, int *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const unsigned int *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, unsigned int *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const unsigned long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, unsigned long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const long long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, long long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const unsigned long long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, unsigned long long *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const float *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, float *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, const double *x, unsigned int n)
void PLearn::binwrite_ (PStream &out, double *x, unsigned int n)
template<class Iterator >
void PLearn::binread_ (PStream &in, Iterator it, unsigned int n, unsigned char typecode)
template<class I , class J >
void PLearn::binread_as (PStream &in, J *x, unsigned int n, bool inverted_byte_order)
 Auxiliary function that reads n elements of type I, optionally swaps their endianness, then converts them into J, and puts them in a J array.
void PLearn::binread_ (PStream &in, bool *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, char *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, signed char *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, unsigned char *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, short *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, unsigned short *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, int *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, unsigned int *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, long *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, unsigned long *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, long long *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, unsigned long long *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, float *x, unsigned int n, unsigned char typecode)
void PLearn::binread_ (PStream &in, double *x, unsigned int n, unsigned char typecode)
template<class SequenceType >
void PLearn::writeSequence (PStream &out, const SequenceType &seq)
template<class SequenceType >
void PLearn::readSequence (PStream &in, SequenceType &seq)
 Reads in a sequence type from a PStream.
template<class T >
void PLearn::write (ostream &out_, const T &o)
template<class T >
void PLearn::read (istream &in_, T &o)
template<class T >
void PLearn::read (const string &stringval, T &x)
template<class T >
PStream & PLearn::operator>> (PStream &in, vector< T > &v)
template<class T >
PStream & PLearn::operator<< (PStream &out, const vector< T > &v)
template<class SetT >
void PLearn::writeSet (PStream &out, const SetT &s)
template<class SetT >
void PLearn::readSet (PStream &in, SetT &s)
template<class T >
PStream & PLearn::operator>> (PStream &in, set< T > &v)
template<class T >
PStream & PLearn::operator<< (PStream &out, const set< T > &v)
template<class PriorityQueueT >
void PLearn::writePriorityQueue (PStream &out, const PriorityQueueT &pq)
template<class PriorityQueueT >
void PLearn::readPriorityQueue (PStream &in, PriorityQueueT &pq)
template<class T >
PStream & PLearn::operator>> (PStream &in, priority_queue< T > &v)
template<class T >
PStream & PLearn::operator<< (PStream &out, const priority_queue< T > &v)

Define Documentation

#define PSTREAM_BUF_SIZE   100

The size of the temporary buffer to use inside some class function.

Putting the buffer as a class variable don't give any speedup. So to remove threads issue, we put them as function variable.

Definition at line 44 of file PStream.h.

Referenced by PLearn::PStream::readAsciiNum(), and PLearn::PStream::writeAsciiNum().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines