ProteoWizard
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
pwiz::msdata::BinaryDataEncoder Class Reference

binary-to-text encoding More...

#include <BinaryDataEncoder.hpp>

List of all members.

Classes

struct  Config
 encoding/decoding configuration More...

Public Types

enum  Precision { Precision_32, Precision_64 }
enum  ByteOrder { ByteOrder_LittleEndian, ByteOrder_BigEndian }
enum  Compression { Compression_None, Compression_Zlib }

Public Member Functions

 BinaryDataEncoder (const Config &config=Config())
void encode (const std::vector< double > &data, std::string &result, size_t *binaryByteCount=NULL) const
 encode binary data as a text string
void encode (const double *data, size_t dataSize, std::string &result, size_t *binaryByteCount=NULL) const
 encode binary data as a text string
void decode (const char *encodedData, size_t len, std::vector< double > &result) const
 decode text-encoded data as binary
void decode (const std::string &encodedData, std::vector< double > &result) const

Private Member Functions

 BinaryDataEncoder (const BinaryDataEncoder &)
BinaryDataEncoderoperator= (const BinaryDataEncoder &)

Private Attributes

boost::shared_ptr< Impl > impl_

Detailed Description

binary-to-text encoding

Definition at line 41 of file BinaryDataEncoder.hpp.


Member Enumeration Documentation

Enumerator:
Precision_32 
Precision_64 

Definition at line 45 of file BinaryDataEncoder.hpp.

Enumerator:
ByteOrder_LittleEndian 
ByteOrder_BigEndian 

Definition at line 46 of file BinaryDataEncoder.hpp.

Enumerator:
Compression_None 
Compression_Zlib 

Definition at line 47 of file BinaryDataEncoder.hpp.


Constructor & Destructor Documentation

pwiz::msdata::BinaryDataEncoder::BinaryDataEncoder ( const Config config = Config())
pwiz::msdata::BinaryDataEncoder::BinaryDataEncoder ( const BinaryDataEncoder )
private

Member Function Documentation

void pwiz::msdata::BinaryDataEncoder::encode ( const std::vector< double > &  data,
std::string &  result,
size_t *  binaryByteCount = NULL 
) const

encode binary data as a text string

Referenced by testBadFile(), and testConfiguration().

void pwiz::msdata::BinaryDataEncoder::encode ( const double *  data,
size_t  dataSize,
std::string &  result,
size_t *  binaryByteCount = NULL 
) const

encode binary data as a text string

void pwiz::msdata::BinaryDataEncoder::decode ( const char *  encodedData,
size_t  len,
std::vector< double > &  result 
) const

decode text-encoded data as binary

Referenced by readData(), testBadFile(), and testConfiguration().

void pwiz::msdata::BinaryDataEncoder::decode ( const std::string &  encodedData,
std::vector< double > &  result 
) const
inline

Definition at line 75 of file BinaryDataEncoder.hpp.

{
decode(encodedData.c_str(),encodedData.length(),result);
}
BinaryDataEncoder& pwiz::msdata::BinaryDataEncoder::operator= ( const BinaryDataEncoder )
private

Member Data Documentation

boost::shared_ptr<Impl> pwiz::msdata::BinaryDataEncoder::impl_
private

Definition at line 81 of file BinaryDataEncoder.hpp.


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