Binary buffered file input.
More...
#include <JFileStreamIO.hh>
Binary buffered file input.
Definition at line 22 of file JFileStreamIO.hh.
JIO::JFileStreamReader::JFileStreamReader |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 36 of file JFileStreamIO.hh.
JBufferedReader(JReader *__in, const int __size=1048576)
Constructor.
Binary input based on std::istream.
JIO::JFileStreamReader::JFileStreamReader |
( |
const char * |
file_name, |
|
|
const int |
size = 1048576 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
file_name | file name |
size | size of internal buffer |
Definition at line 48 of file JFileStreamIO.hh.
JBufferedReader(JReader *__in, const int __size=1048576)
Constructor.
void open(const char *file_name)
Open file.
Binary input based on std::istream.
int size
size of internal buffer
void JIO::JFileStreamReader::open |
( |
const char * |
file_name | ) |
|
|
inline |
Open file.
- Parameters
-
Definition at line 62 of file JFileStreamIO.hh.
64 static_cast<std::ifstream*
>(
this)->
open(file_name, std::ios::binary);
void open(const char *file_name)
Open file.
virtual bool JIO::JBufferedReader::getStatus |
( |
| ) |
const |
|
inlinevirtualinherited |
virtual void JIO::JBufferedReader::clear |
( |
| ) |
|
|
inlinevirtualinherited |
virtual int JIO::JBufferedReader::read |
( |
char * |
zbuf, |
|
|
int |
n |
|
) |
| |
|
inlinevirtualinherited |
Read byte array.
- Parameters
-
zbuf | pointer to byte array |
n | number of bytes |
- Returns
- number of bytes
Implements JLANG::JBinaryInput.
Definition at line 84 of file JBufferedIO.hh.
86 for (
int i = 0; i != n; ) {
int pos
pointer to begin of available data
int ls
pointer to end of available data
JLANG::JSinglePointer< JReader > in
int size
size of internal buffer
char * buffer
internal buffer
Read serialisable data object.
- Parameters
-
object | serialisable data object |
- Returns
- JReader
Definition at line 80 of file JSerialisable.hh.
82 return object.read(*
this);
JReader& JIO::JReader::operator>> |
( |
bool & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
char & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
unsigned char & |
value | ) |
|
|
inlineinherited |
Definition at line 88 of file JSerialisable.hh.
88 {
read((
char*) &value,
sizeof(
unsigned char));
return *
this; }
JReader& JIO::JReader::operator>> |
( |
short & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
unsigned short & |
value | ) |
|
|
inlineinherited |
Definition at line 90 of file JSerialisable.hh.
90 {
read((
char*) &value,
sizeof(
unsigned short));
return *
this; }
JReader& JIO::JReader::operator>> |
( |
int & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
unsigned int & |
value | ) |
|
|
inlineinherited |
Definition at line 92 of file JSerialisable.hh.
92 {
read((
char*) &value,
sizeof(
unsigned int));
return *
this; }
JReader& JIO::JReader::operator>> |
( |
long int & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
long long int & |
value | ) |
|
|
inlineinherited |
Definition at line 94 of file JSerialisable.hh.
94 {
read((
char*) &value,
sizeof(
long long int));
return *
this; }
JReader& JIO::JReader::operator>> |
( |
unsigned long long int & |
value | ) |
|
|
inlineinherited |
Definition at line 95 of file JSerialisable.hh.
95 {
read((
char*) &value,
sizeof(
unsigned long long int));
return *
this; }
JReader& JIO::JReader::operator>> |
( |
float & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
double & |
value | ) |
|
|
inlineinherited |
JReader& JIO::JReader::operator>> |
( |
long double & |
value | ) |
|
|
inlineinherited |
Definition at line 98 of file JSerialisable.hh.
98 {
read((
char*) &value,
sizeof(
long double));
return *
this; }
Read object.
- Parameters
-
- Returns
- this reader
Definition at line 107 of file JSerialisable.hh.
109 return object.read(*
this);
template<class T >
JReader& JIO::JReader::load |
( |
T & |
object | ) |
|
|
inlineinherited |
Read object.
- Parameters
-
- Returns
- this reader
Definition at line 120 of file JSerialisable.hh.
122 return *
this >> object;
JLANG::JAbstractObjectStatus::operator bool |
( |
| ) |
const |
|
inlineinherited |
Type conversion operator.
- Returns
- status of this object
Definition at line 33 of file JAbstractObjectStatus.hh.
virtual bool getStatus() const =0
Get status of object.
bool JLANG::JAbstractObjectStatus::operator! |
( |
| ) |
const |
|
inlineinherited |
Negated status of this object.
- Returns
- negated status of this object
Definition at line 44 of file JAbstractObjectStatus.hh.
virtual bool getStatus() const =0
Get status of object.
char* JIO::JBufferedReader::buffer |
|
protectedinherited |
int JIO::JBufferedReader::size |
|
protectedinherited |
int JIO::JBufferedReader::pos |
|
protectedinherited |
int JIO::JBufferedReader::ls |
|
protectedinherited |
bool JIO::JBufferedReader::eof |
|
protectedinherited |
The documentation for this class was generated from the following file: