#include <itpp/base/binfile.h>
Inheritance diagram for itpp::bifstream:
Public Types | |
enum | endian { l_endian, b_endian } |
Definition of the endian data type. More... | |
Public Member Functions | |
bifstream (const std::string &name, endian e=b_endian) | |
Class constructor that opens a file and sets the endianity. | |
bifstream () | |
Class Constructor. | |
~bifstream () | |
Class Destructor. | |
void | open (const std::string &name, endian e=b_endian) |
Open a file for reading and set the endianity. | |
long | length () |
Returns the length in bytes of the file. | |
bifstream & | operator>> (char &a) |
Reads a char variable from the binary input file. | |
bifstream & | operator>> (class bin &a) |
Reads a bin variable from the binary input file. | |
bifstream & | operator>> (int &a) |
Reads an int variable from the binary input file. | |
bifstream & | operator>> (unsigned int &a) |
Reads an unsigned int variable from the binary input file. | |
bifstream & | operator>> (short int &a) |
Reads a short int variable from the binary input file. | |
bifstream & | operator>> (unsigned short int &a) |
Reads an unsigned short int variable from the binary input file. | |
bifstream & | operator>> (float &a) |
Reads a float variable from the binary input file. | |
bifstream & | operator>> (double &a) |
Reads a double variable from the binary input file. | |
bifstream & | operator>> (long int &a) |
Reads a long int variable from the binary input file. | |
bifstream & | operator>> (unsigned long int &a) |
Reads an unsigned long int variable from the binary input file. | |
bifstream & | operator>> (char *a) |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!! | |
bifstream & | operator>> (std::string &a) |
Reads a string variable from the binary input file. | |
endian | get_endianity () const |
Returns the endianity of the class (l_endian or b_endian ). | |
endian | get_native_endianity () const |
Returns the native endianity for this computer architecture (l_endian or b_endian ). | |
void | set_endianity (endian e) |
Set the endianity for this class. | |
void | set_native_endianity () |
Set the endianity of this class to the native endianity for this computer architecture. | |
Protected Attributes | |
endian | endianity |
The endianity used by this class. | |
endian | native_endianity |
The native endianity for this computer architecture. |
Definition at line 166 of file binfile.h.
|
Definition of the endian data type.
The Endian defines the order in which multibyte numbers are stored in the file. The two orders are called "Little Endian" ( "Little Endian" means that the low-order byte of the number is stored at the lowest adress (i.e. the little end comes first). "Big Endian" means that the high-order byte of the number is stored in memory at the highest address (i.e. the big end comes first) |
|
Class constructor that opens a file and sets the endianity.
Definition at line 262 of file binfile.cpp. |
|
Class Constructor.
Definition at line 267 of file binfile.cpp. |
|
Class Destructor.
|
|
Open a file for reading and set the endianity.
Definition at line 272 of file binfile.cpp. |
|
Returns the length in bytes of the file.
Definition at line 278 of file binfile.cpp. |
|
Reads a
Definition at line 288 of file binfile.cpp. |
|
Reads a
Definition at line 294 of file binfile.cpp. |
|
Reads an
Definition at line 302 of file binfile.cpp. |
|
Reads an
Definition at line 317 of file binfile.cpp. |
|
Reads a
Definition at line 332 of file binfile.cpp. |
|
Reads an
Definition at line 345 of file binfile.cpp. |
|
Reads a
Definition at line 358 of file binfile.cpp. |
|
Reads a
Definition at line 373 of file binfile.cpp. |
|
Reads a
Definition at line 413 of file binfile.cpp. |
|
Reads an
Definition at line 428 of file binfile.cpp. |
|
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!
Definition at line 443 of file binfile.cpp. |
|
Reads a
Definition at line 449 of file binfile.cpp. |
|
Returns the endianity of the class (
|
|
Returns the native endianity for this computer architecture ( Intel processors use "Little Endian" byte ordering while e.g. Motorola processors use "Big Endian" byte ordering. Definition at line 85 of file binfile.h. Referenced by itpp::it_file::write_data_header(). |
|
Set the endianity for this class.
Definition at line 90 of file binfile.h. Referenced by itpp::it_ifile::read_data_header(), and itpp::it_file::write_data_header_here(). |
|
Set the endianity of this class to the native endianity for this computer architecture.
|
|
The endianity used by this class.
Definition at line 99 of file binfile.h. Referenced by itpp::bfstream_base::bfstream_base(), itpp::it_ifile::read_data_header(), itpp::it_file::write_data_header(), and itpp::it_file::write_data_header_here(). |
|
The native endianity for this computer architecture.
Definition at line 101 of file binfile.h. Referenced by itpp::bfstream_base::bfstream_base(). |
Generated on Fri Jan 11 08:51:41 2008 for IT++ by Doxygen 1.3.9.1