18#ifndef _LOG4CXX_HELPERS_CHARSETENCODER_H
19#define _LOG4CXX_HELPERS_CHARSETENCODER_H
82 static void encode(CharsetEncoderPtr& enc,
84 LogString::const_iterator& iter,
97 LogString::const_iterator& iter,
114 inline static bool isError(log4cxx_status_t stat)
A byte buffer.
Definition: bytebuffer.h:34
An engine to transform LogStrings into bytes for the specific character set.
Definition: charsetencoder.h:38
virtual void reset()
Resets any internal state.
CharsetEncoder()
Protected constructor.
virtual ~CharsetEncoder()
Destructor.
virtual log4cxx_status_t encode(const LogString &in, LogString::const_iterator &iter, ByteBuffer &out)=0
Encodes as many characters from the input string as possible to the output buffer.
static CharsetEncoderPtr getUTF8Encoder()
Get encoder for UTF-8.
virtual void flush(ByteBuffer &out)
Flushes the encoder.
static bool isError(log4cxx_status_t stat)
Determines if the return value from encode indicates an unconvertable character.
Definition: charsetencoder.h:114
static void encode(CharsetEncoderPtr &enc, const LogString &src, LogString::const_iterator &iter, ByteBuffer &dst)
Encodes a string replacing unmappable characters with escape sequences.
static CharsetEncoderPtr getEncoder(const LogString &charset)
Get encoder for specified character set.
static CharsetEncoderPtr getDefaultEncoder()
Get encoder for default charset.
base class for java-like objects.
Definition: object.h:105
Definition: configuration.h:25
std::basic_string< logchar > LogString
Definition: logstring.h:60
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:157
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:38
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:151
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:145