TextEncodingRegistry documentation

This commit is contained in:
Alex Fabijanic 2017-11-07 15:55:50 -06:00
parent a294e1fd88
commit 7250de8a65
2 changed files with 12 additions and 1 deletions

View File

@ -184,11 +184,15 @@ protected:
class Foundation_API TextEncodingRegistry
/// This class serves as the main registry for all
/// supported TextEncoding's.
{
public:
TextEncodingRegistry();
/// Constructs TextEncodingRegistry
~TextEncodingRegistry();
/// Destroys TextEncodingRegistry
bool has(const std::string& name) const;
// Returns true if requested encoding is found.
@ -196,12 +200,19 @@ public:
// alternative encoding name.
void add(TextEncoding::Ptr pEncoding);
/// Adds encoding to the registry under its canonnical name.
void add(TextEncoding::Ptr pEncoding, const std::string& name);
/// Adds encoding to the registry under the specified name.
void remove(const std::string& name);
/// Removes the specified encoding from the registry.
TextEncoding::Ptr find(const std::string& name) const;
/// Returns Ptr to the enconding registerd under the speciied
/// name or having the name as an alias.
///
/// If encoding is not found, the returned Ptr points to nothing.
private:
TextEncodingRegistry(const TextEncodingRegistry&);

View File

@ -375,7 +375,7 @@ Poco::Timespan WebSocketImpl::getReceiveTimeout()
int WebSocketImpl::available()
{
int n = _buffer.size() - _bufferOffset;
int n = static_cast<int>(_buffer.size()) - _bufferOffset;
if (n > 0)
return n + _pStreamSocketImpl->available();
else