CarobNS::StringCodec Class Reference

Base class for en/decoders. More...

#include <StringCodecs.hpp>

Inheritance diagram for CarobNS::StringCodec:

CarobNS::MBSCodec List of all members.

Public Member Functions

virtual std::string encode (const std::wstring &) const =0 throw (CodecException)
 Encodes the given string using the encoding set in the constructor.
virtual std::wstring decode (const std::string &) const =0 throw (CodecException)
 Decodes the given bytes using the encoding set in the constructor.
virtual std::string nomutex_encode (const std::wstring &s) const throw (CodecException)
 Optional optimization.
virtual std::wstring nomutex_decode (const std::string &s) const throw (CodecException)
 See nomutex_encode.

Detailed Description

Base class for en/decoders.


Member Function Documentation

virtual std::wstring CarobNS::StringCodec::decode ( const std::string &   )  const throw (CodecException) [pure virtual]

Decodes the given bytes using the encoding set in the constructor.

Thread safe

Implemented in CarobNS::MBSCodec.

virtual std::string CarobNS::StringCodec::encode ( const std::wstring &   )  const throw (CodecException) [pure virtual]

Encodes the given string using the encoding set in the constructor.

Thread safe

Implemented in CarobNS::MBSCodec.

virtual std::wstring CarobNS::StringCodec::nomutex_decode ( const std::string &  s  )  const throw (CodecException) [inline, virtual]

See nomutex_encode.

Calling nomutex_encode() and nomutex_decode() each only once at the same time is safe

Parameters:
s encoded string
Returns:
decoded wide string

virtual std::string CarobNS::StringCodec::nomutex_encode ( const std::wstring &  s  )  const throw (CodecException) [inline, virtual]

Optional optimization.

Maybe faster method, suitable ONLY for non-concurrent use. Unlike the safe encode() method above, this method may or may not be thread-safe, depending on the actual codec implementation

Parameters:
s decoded wide string
Returns:
encoded string


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 17:40:20 2007 for Carob by  doxygen 1.4.7