cartobase 6.0.6
carto::ByteSwapper Class Reference

#include <cartobase/type/byte_order.h>

Public Member Functions

 ByteSwapper (int bo=byteOrder())
 
 ByteSwapper (const std::string &bos)
 
bool isSwapped () const
 
bool setSwapped (bool s)
 
void reorder (signed char &p) const
 
void reorder (unsigned char &p) const
 
void reorder (short &p) const
 
void reorder (unsigned short &p) const
 
void reorder (int &p) const
 
void reorder (unsigned int &p) const
 
void reorder (long &p) const
 
void reorder (unsigned long &p) const
 
void reorder (long long &p) const
 
void reorder (unsigned long long &p) const
 
void reorder (float &p) const
 
void reorder (double &p) const
 
void reorder (long double &p) const
 
void reorder (std::complex< float > &p) const
 
void reorder (std::complex< double > &p) const
 
void reorder (std::complex< long double > &p) const
 
std::istream & read (std::istream &, short &p) const
 
std::istream & read (std::istream &, unsigned short &p) const
 
std::istream & read (std::istream &, int &p) const
 
std::istream & read (std::istream &, unsigned int &p) const
 
std::istream & read (std::istream &, long &p) const
 
std::istream & read (std::istream &, unsigned long &p) const
 
std::istream & read (std::istream &, long long &p) const
 
std::istream & read (std::istream &, unsigned long long &p) const
 
std::istream & read (std::istream &, float &p) const
 
std::istream & read (std::istream &, double &p) const
 
std::istream & read (std::istream &, long double &p) const
 
std::ostream & write (std::ostream &, short &p) const
 
std::ostream & write (std::ostream &, unsigned short &p) const
 
std::ostream & write (std::ostream &, int &p) const
 
std::ostream & write (std::ostream &, unsigned int &p) const
 
std::ostream & write (std::ostream &, long &p) const
 
std::ostream & write (std::ostream &, unsigned long &p) const
 
std::ostream & write (std::ostream &, long long &p) const
 
std::ostream & write (std::ostream &, unsigned long long &p) const
 
std::ostream & write (std::ostream &, float &p) const
 
std::ostream & write (std::ostream &, double &p) const
 
std::ostream & write (std::ostream &, long double &p) const
 

Detailed Description

Definition at line 61 of file byte_order.h.

Constructor & Destructor Documentation

◆ ByteSwapper() [1/2]

carto::ByteSwapper::ByteSwapper ( int bo = byteOrder())

◆ ByteSwapper() [2/2]

carto::ByteSwapper::ByteSwapper ( const std::string & bos)

Member Function Documentation

◆ isSwapped()

bool carto::ByteSwapper::isSwapped ( ) const
inline

Definition at line 70 of file byte_order.h.

◆ read() [1/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
double & p ) const
inline

Definition at line 383 of file byte_order.h.

◆ read() [2/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
float & p ) const
inline

Definition at line 374 of file byte_order.h.

◆ read() [3/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
int & p ) const
inline

Definition at line 315 of file byte_order.h.

◆ read() [4/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
long & p ) const
inline

Definition at line 335 of file byte_order.h.

◆ read() [5/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
long double & p ) const
inline

Definition at line 393 of file byte_order.h.

◆ read() [6/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
long long & p ) const
inline

Definition at line 355 of file byte_order.h.

◆ read() [7/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
short & p ) const
inline

Definition at line 295 of file byte_order.h.

◆ read() [8/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
unsigned int & p ) const
inline

Definition at line 325 of file byte_order.h.

◆ read() [9/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
unsigned long & p ) const
inline

Definition at line 345 of file byte_order.h.

◆ read() [10/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
unsigned long long & p ) const
inline

Definition at line 365 of file byte_order.h.

◆ read() [11/11]

std::istream & carto::ByteSwapper::read ( std::istream & in,
unsigned short & p ) const
inline

Definition at line 305 of file byte_order.h.

◆ reorder() [1/16]

void carto::ByteSwapper::reorder ( double & p) const
inline

Definition at line 248 of file byte_order.h.

◆ reorder() [2/16]

void carto::ByteSwapper::reorder ( float & p) const
inline

Definition at line 243 of file byte_order.h.

◆ reorder() [3/16]

void carto::ByteSwapper::reorder ( int & p) const
inline

Definition at line 213 of file byte_order.h.

◆ reorder() [4/16]

void carto::ByteSwapper::reorder ( long & p) const
inline

Definition at line 223 of file byte_order.h.

◆ reorder() [5/16]

void carto::ByteSwapper::reorder ( long double & p) const
inline

Definition at line 253 of file byte_order.h.

◆ reorder() [6/16]

void carto::ByteSwapper::reorder ( long long & p) const
inline

Definition at line 233 of file byte_order.h.

◆ reorder() [7/16]

void carto::ByteSwapper::reorder ( short & p) const
inline

Definition at line 203 of file byte_order.h.

◆ reorder() [8/16]

void carto::ByteSwapper::reorder ( signed char & p) const
inline

Definition at line 193 of file byte_order.h.

Referenced by reorder(), reorder(), and reorder().

◆ reorder() [9/16]

void carto::ByteSwapper::reorder ( std::complex< double > & p) const
inline

Definition at line 270 of file byte_order.h.

References reorder().

◆ reorder() [10/16]

void carto::ByteSwapper::reorder ( std::complex< float > & p) const
inline

Definition at line 258 of file byte_order.h.

References reorder().

◆ reorder() [11/16]

void carto::ByteSwapper::reorder ( std::complex< long double > & p) const
inline

Definition at line 282 of file byte_order.h.

References reorder().

◆ reorder() [12/16]

void carto::ByteSwapper::reorder ( unsigned char & p) const
inline

Definition at line 198 of file byte_order.h.

◆ reorder() [13/16]

void carto::ByteSwapper::reorder ( unsigned int & p) const
inline

Definition at line 218 of file byte_order.h.

◆ reorder() [14/16]

void carto::ByteSwapper::reorder ( unsigned long & p) const
inline

Definition at line 228 of file byte_order.h.

◆ reorder() [15/16]

void carto::ByteSwapper::reorder ( unsigned long long & p) const
inline

Definition at line 238 of file byte_order.h.

◆ reorder() [16/16]

void carto::ByteSwapper::reorder ( unsigned short & p) const
inline

Definition at line 208 of file byte_order.h.

◆ setSwapped()

bool carto::ByteSwapper::setSwapped ( bool s)
inline

Definition at line 71 of file byte_order.h.

◆ write() [1/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
double & p ) const
inline

Definition at line 493 of file byte_order.h.

◆ write() [2/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
float & p ) const
inline

Definition at line 483 of file byte_order.h.

◆ write() [3/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
int & p ) const
inline

Definition at line 423 of file byte_order.h.

◆ write() [4/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
long & p ) const
inline

Definition at line 443 of file byte_order.h.

◆ write() [5/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
long double & p ) const
inline

Definition at line 503 of file byte_order.h.

◆ write() [6/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
long long & p ) const
inline

Definition at line 473 of file byte_order.h.

◆ write() [7/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
short & p ) const
inline

Definition at line 403 of file byte_order.h.

◆ write() [8/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
unsigned int & p ) const
inline

Definition at line 433 of file byte_order.h.

◆ write() [9/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
unsigned long & p ) const
inline

Definition at line 453 of file byte_order.h.

◆ write() [10/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
unsigned long long & p ) const
inline

Definition at line 463 of file byte_order.h.

◆ write() [11/11]

std::ostream & carto::ByteSwapper::write ( std::ostream & out,
unsigned short & p ) const
inline

Definition at line 413 of file byte_order.h.


The documentation for this class was generated from the following file: