CharSet.h (Firebird-3.0.2.32703-0.tar.bz2) | : | CharSet.h (Firebird-3.0.4.33054-0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
* Contributor(s): ______________________________________. | * Contributor(s): ______________________________________. | |||
* | * | |||
* 2006.10.10 Adriano dos Santos Fernandes - refactored from intl_classes.h | * 2006.10.10 Adriano dos Santos Fernandes - refactored from intl_classes.h | |||
* | * | |||
*/ | */ | |||
#ifndef JRD_CHARSET_H | #ifndef JRD_CHARSET_H | |||
#define JRD_CHARSET_H | #define JRD_CHARSET_H | |||
#include "CsConvert.h" | #include "CsConvert.h" | |||
#include "IntlUtil.h" | ||||
namespace Firebird { | ||||
template <> | ||||
inline void SimpleDelete<charset>::clear(charset* cs) | ||||
{ | ||||
Firebird::IntlUtil::finiCharset(cs); | ||||
delete cs; | ||||
} | ||||
} | ||||
namespace Jrd { | namespace Jrd { | |||
class CharSet | class CharSet | |||
{ | { | |||
public: | public: | |||
class Delete | class Delete | |||
{ | { | |||
public: | public: | |||
static void clear(charset* cs) | static void clear(charset* cs) | |||
{ | { | |||
if (cs->charset_fn_destroy) | Firebird::IntlUtil::finiCharset(cs); | |||
cs->charset_fn_destroy(cs); | ||||
delete cs; | delete cs; | |||
} | } | |||
}; | }; | |||
static CharSet* createInstance(Firebird::MemoryPool& pool, USHORT id, cha rset* cs); | static CharSet* createInstance(Firebird::MemoryPool& pool, USHORT id, cha rset* cs); | |||
protected: | protected: | |||
CharSet(USHORT _id, charset* _cs) | CharSet(USHORT _id, charset* _cs) | |||
: id(_id), | : id(_id), | |||
cs(_cs) | cs(_cs) | |||
skipping to change at line 119 | skipping to change at line 130 | |||
return cs->charset_fn_well_formed(cs, len, str, offending Pos); | return cs->charset_fn_well_formed(cs, len, str, offending Pos); | |||
return true; | return true; | |||
} | } | |||
CsConvert getConvToUnicode() const { return CsConvert(cs, NULL); } | CsConvert getConvToUnicode() const { return CsConvert(cs, NULL); } | |||
CsConvert getConvFromUnicode() const { return CsConvert(NULL, cs); } | CsConvert getConvFromUnicode() const { return CsConvert(NULL, cs); } | |||
void destroy() | void destroy() | |||
{ | { | |||
if (cs->charset_fn_destroy) | Firebird::IntlUtil::finiCharset(cs); | |||
cs->charset_fn_destroy(cs); | ||||
} | } | |||
const UCHAR* getSqlMatchAny() const { return sqlMatchAny; } | const UCHAR* getSqlMatchAny() const { return sqlMatchAny; } | |||
const UCHAR* getSqlMatchOne() const { return sqlMatchOne; } | const UCHAR* getSqlMatchOne() const { return sqlMatchOne; } | |||
BYTE getSqlMatchAnyLength() const { return sqlMatchAnyLength; } | BYTE getSqlMatchAnyLength() const { return sqlMatchAnyLength; } | |||
BYTE getSqlMatchOneLength() const { return sqlMatchOneLength; } | BYTE getSqlMatchOneLength() const { return sqlMatchOneLength; } | |||
charset* getStruct() const { return cs; } | charset* getStruct() const { return cs; } | |||
ULONG removeTrailingSpaces(ULONG srcLen, const UCHAR* src) const | ULONG removeTrailingSpaces(ULONG srcLen, const UCHAR* src) const | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 14 lines changed or added |