#include <StringCodecs.hpp>
Inheritance diagram for CarobNS::StringCodec:
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. |
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
s | encoded 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
s | decoded wide string |