converter.h
来自「这个是symbian下的一个蛮庞大的3D游戏源代码!对于学习3D开发的人有很大的」· C头文件 代码 · 共 54 行
H
54 行
#ifndef _LANG_CONVERTER_H
#define _LANG_CONVERTER_H
#include <lang/Object.h>
namespace lang
{
/**
* Character encoding/decoding interface.
* Converts to/from Unicode code points.
*
*
* @ingroup lang
*/
class Converter :
public lang::Object
{
public:
/**
* Decodes bytes to single Unicode code point.
* Ignores invalid input byte sequences.
*
* @param src Ptr to the source data.
* @param srcend Ptr to the end of source data.
* @param srcbytes [out] Receives number of bytes decoded.
* @param dst [out] Receives decoded Unicode code point (if byte sequence was not malformed).
* @return false if decoded byte sequence was malformed.
*/
virtual bool decode( const void* src, const void* srcend, int* srcbytes, int* dst ) const = 0;
/**
* Encodes single Unicode code point to bytes.
*
* @param dst Destination buffer which receives encoded byte sequence.
* @param dstend End of the destination buffer.
* @param dstbytes [out] Receives number of bytes encoded.
* @param src Unicode code point to encode.
* @return false if the code point couldn't be encoded.
*/
virtual bool encode( void* dst, void* dstend, int* dstbytes, int src ) const = 0;
};
} // lang
#endif // _LANG_CONVERTER_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?