BinPtr Class Referencefile BinPtr.h a class for doing item I/O on a memory buffer.
More...
#include <BinPtr.h>
List of all members.
|
Public Member Functions |
| | BinPtr (const void *base) |
| | Initialize the BinPtr the the memory buffer at base.
|
| | BinPtr (istream &fs) |
| | Initialize the BinPtr to the input stream fs.
|
| | BinPtr (ostream &fs) |
| | Initialize the BinPtr to the output stream fs.
|
| | ~BinPtr () |
| | Destroy the BinPtr.
|
| void | fetch (void *buf, int length) |
| | Read in length bytes from the input.
|
| void | fetch (binptr_4 &x) |
| | Read a 4 byte integer.
|
| void | fetch (binptr_2 &x) |
| | Read a 2 byte integer.
|
| void | fetch (binptr_1 &x) |
| | Read a 1 byte integer.
|
| void | fetch (double &x) |
| | Read an 8 byte floating point number.
|
| void | store (const void *buf, int length) |
| | Write out length bytes to the output.
|
| void | store (long value, int length) |
| | Write value as a length byte integer.
|
| void | store (binptr_4 &x) |
| | Write a 4 byte integer.
|
| void | store (binptr_2 &x) |
| | Write a 2 byte integer.
|
| void | store (binptr_1 &x) |
| | Write a 1 byte integer.
|
| void | store (double &x) |
| | Write an 8 byte floating point number.
|
| void | reset (const void *base) |
| | Initialize the BinPtr to base.
|
| void | reset (istream &fs) |
| | Initialize the BinPtr to input from fs.
|
| void | reset (ostream &fs) |
| | Initialize the BinPtr to write to fs.
|
Detailed Description
file BinPtr.h a class for doing item I/O on a memory buffer.
Polaris Base - See also:
- BinPtr.h
BinPtr.h
This classes is intended for reading/writing binary objects to a section of memory. It is essentially a frontend to the <memory.h> commands. In addition, we can also read from a file with the same interface.
The BinRep class needs to have easy access to the binary representation of items stored in a stream of memory. Also, we need to be able to do the same operations is the memory buffer is mapped to a iostream.
Definition at line 39 of file BinPtr.h.
Constructor & Destructor Documentation
| BinPtr::BinPtr |
( |
const void * |
base |
) |
[inline] |
|
| BinPtr::BinPtr |
( |
istream & |
fs |
) |
[inline] |
|
| BinPtr::BinPtr |
( |
ostream & |
fs |
) |
[inline] |
|
Member Function Documentation
| void BinPtr::fetch |
( |
void * |
buf, |
|
|
int |
length |
|
) |
[inline] |
|
| void BinPtr::fetch |
( |
binptr_4 & |
x |
) |
[inline] |
|
|
|
Read a 4 byte integer.
Definition at line 153 of file BinPtr.h. |
| void BinPtr::fetch |
( |
binptr_2 & |
x |
) |
[inline] |
|
|
|
Read a 2 byte integer.
Definition at line 164 of file BinPtr.h. |
| void BinPtr::fetch |
( |
binptr_1 & |
x |
) |
[inline] |
|
|
|
Read a 1 byte integer.
Definition at line 175 of file BinPtr.h. |
| void BinPtr::fetch |
( |
double & |
x |
) |
[inline] |
|
|
|
Read an 8 byte floating point number.
Definition at line 186 of file BinPtr.h. |
| void BinPtr::store |
( |
const void * |
buf, |
|
|
int |
length |
|
) |
[inline] |
|
| void BinPtr::store |
( |
long |
value, |
|
|
int |
length |
|
) |
[inline] |
|
|
|
Write value as a length byte integer.
Definition at line 210 of file BinPtr.h. |
| void BinPtr::store |
( |
binptr_4 & |
x |
) |
[inline] |
|
|
|
Write a 4 byte integer.
Definition at line 255 of file BinPtr.h. |
| void BinPtr::store |
( |
binptr_2 & |
x |
) |
[inline] |
|
|
|
Write a 2 byte integer.
Definition at line 266 of file BinPtr.h. |
| void BinPtr::store |
( |
binptr_1 & |
x |
) |
[inline] |
|
|
|
Write a 1 byte integer.
Definition at line 277 of file BinPtr.h. |
| void BinPtr::store |
( |
double & |
x |
) |
[inline] |
|
|
|
Write an 8 byte floating point number.
Definition at line 288 of file BinPtr.h. |
| void BinPtr::reset |
( |
const void * |
base |
) |
[inline] |
|
| void BinPtr::reset |
( |
istream & |
fs |
) |
[inline] |
|
|
|
Initialize the BinPtr to input from fs.
Definition at line 308 of file BinPtr.h. |
| void BinPtr::reset |
( |
ostream & |
fs |
) |
[inline] |
|
|
|
Initialize the BinPtr to write to fs.
Definition at line 315 of file BinPtr.h. |
The documentation for this class was generated from the following file:
|