trunk/branch integration: optimalization

This commit is contained in:
Marian Krivos 2011-08-23 06:48:29 +00:00
parent 9cf13e2976
commit 5197acba9e
2 changed files with 45 additions and 23 deletions

View File

@ -55,6 +55,12 @@ class Foundation_API HexBinaryDecoderBuf: public UnbufferedStreamBuf
/// 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);
@ -64,7 +70,7 @@ private:
int readFromDevice();
int readOne();
std::istream& _istr;
std::streambuf& _buf;
};
@ -91,6 +97,12 @@ class Foundation_API HexBinaryDecoder: public HexBinaryDecoderIOS, public std::i
/// 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);

View File

@ -56,6 +56,11 @@ class Foundation_API HexBinaryEncoderBuf: public UnbufferedStreamBuf
/// 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);
@ -84,7 +89,7 @@ private:
int _pos;
int _lineLength;
int _uppercase;
std::ostream& _ostr;
std::streambuf& _buf;
};
@ -116,6 +121,11 @@ class Foundation_API HexBinaryEncoder: public HexBinaryEncoderIOS, public std::o
/// 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);