mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-29 12:45:22 +01:00
trunk/branch integration: optimalization
This commit is contained in:
parent
9cf13e2976
commit
5197acba9e
@ -52,19 +52,25 @@ class Foundation_API HexBinaryDecoderBuf: public UnbufferedStreamBuf
|
||||
/// This streambuf decodes all hexBinary-encoded data read
|
||||
/// from the istream connected to it.
|
||||
/// In hexBinary encoding, each binary octet is encoded as a character tuple,
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
///
|
||||
/// Note: For performance reasons, the characters
|
||||
/// are read directly from the given istream's
|
||||
/// underlying streambuf, so the state
|
||||
/// of the istream will not reflect that of
|
||||
/// its streambuf.
|
||||
{
|
||||
public:
|
||||
HexBinaryDecoderBuf(std::istream& istr);
|
||||
HexBinaryDecoderBuf(std::istream& istr);
|
||||
~HexBinaryDecoderBuf();
|
||||
|
||||
private:
|
||||
int readFromDevice();
|
||||
int readOne();
|
||||
int readFromDevice();
|
||||
int readOne();
|
||||
|
||||
std::istream& _istr;
|
||||
std::streambuf& _buf;
|
||||
};
|
||||
|
||||
|
||||
@ -88,12 +94,18 @@ class Foundation_API HexBinaryDecoder: public HexBinaryDecoderIOS, public std::i
|
||||
/// This istream decodes all hexBinary-encoded data read
|
||||
/// from the istream connected to it.
|
||||
/// In hexBinary encoding, each binary octet is encoded as a character tuple,
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
///
|
||||
/// Note: For performance reasons, the characters
|
||||
/// are read directly from the given istream's
|
||||
/// underlying streambuf, so the state
|
||||
/// of the istream will not reflect that of
|
||||
/// its streambuf.
|
||||
{
|
||||
public:
|
||||
HexBinaryDecoder(std::istream& istr);
|
||||
HexBinaryDecoder(std::istream& istr);
|
||||
~HexBinaryDecoder();
|
||||
};
|
||||
|
||||
|
@ -53,12 +53,17 @@ class Foundation_API HexBinaryEncoderBuf: public UnbufferedStreamBuf
|
||||
/// to it in hexBinary encoding and forwards it to a connected
|
||||
/// ostream.
|
||||
/// In hexBinary encoding, each binary octet is encoded as a character tuple,
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
///
|
||||
/// Note: The characters are directly written
|
||||
/// to the ostream's streambuf, thus bypassing
|
||||
/// the ostream. The ostream's state is therefore
|
||||
/// not updated to match the buffer's state.
|
||||
{
|
||||
public:
|
||||
HexBinaryEncoderBuf(std::ostream& ostr);
|
||||
HexBinaryEncoderBuf(std::ostream& ostr);
|
||||
~HexBinaryEncoderBuf();
|
||||
|
||||
int close();
|
||||
@ -81,10 +86,10 @@ public:
|
||||
private:
|
||||
int writeToDevice(char c);
|
||||
|
||||
int _pos;
|
||||
int _lineLength;
|
||||
int _uppercase;
|
||||
std::ostream& _ostr;
|
||||
int _pos;
|
||||
int _lineLength;
|
||||
int _uppercase;
|
||||
std::streambuf& _buf;
|
||||
};
|
||||
|
||||
|
||||
@ -113,12 +118,17 @@ class Foundation_API HexBinaryEncoder: public HexBinaryEncoderIOS, public std::o
|
||||
/// writing data, to ensure proper
|
||||
/// completion of the encoding operation.
|
||||
/// In hexBinary encoding, each binary octet is encoded as a character tuple,
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
/// consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code.
|
||||
/// See also: XML Schema Part 2: Datatypes (http://www.w3.org/TR/xmlschema-2/),
|
||||
/// section 3.2.15.
|
||||
///
|
||||
/// Note: The characters are directly written
|
||||
/// to the ostream's streambuf, thus bypassing
|
||||
/// the ostream. The ostream's state is therefore
|
||||
/// not updated to match the buffer's state.
|
||||
{
|
||||
public:
|
||||
HexBinaryEncoder(std::ostream& ostr);
|
||||
HexBinaryEncoder(std::ostream& ostr);
|
||||
~HexBinaryEncoder();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user