Qt 4.8
Public Functions | Public Variables | List of all members
QIconvCodec::IconvState Class Reference

#include <qiconvcodec_p.h>

Public Functions

 IconvState (iconv_t x)
 
void saveChars (const char *c, int count)
 
 ~IconvState ()
 

Public Variables

char array [8]
 
char * buffer
 
int bufferLen
 
iconv_t cd
 
ConverterState internalState
 

Detailed Description

Definition at line 85 of file qiconvcodec_p.h.

Constructors and Destructors

◆ IconvState()

QIconvCodec::IconvState::IconvState ( iconv_t  x)

◆ ~IconvState()

QIconvCodec::IconvState::~IconvState ( )

Definition at line 142 of file qiconvcodec.cpp.

143 {
144  if (cd != reinterpret_cast<iconv_t>(-1))
145  iconv_close(cd);
146  if (buffer != array)
147  delete[] buffer;
148 }
#define iconv_close

Functions

◆ saveChars()

void QIconvCodec::IconvState::saveChars ( const char *  c,
int  count 
)

Definition at line 150 of file qiconvcodec.cpp.

Referenced by QIconvCodec::convertToUnicode().

151 {
152  if (count > bufferLen) {
153  if (buffer != array)
154  delete[] buffer;
155  buffer = new char[bufferLen = count];
156  }
157 
158  memcpy(buffer, c, count);
159 }
unsigned char c[8]
Definition: qnumeric_p.h:62

Properties

◆ array

char QIconvCodec::IconvState::array[8]

Definition at line 95 of file qiconvcodec_p.h.

Referenced by saveChars(), and ~IconvState().

◆ buffer

char* QIconvCodec::IconvState::buffer

Definition at line 91 of file qiconvcodec_p.h.

Referenced by QIconvCodec::convertToUnicode(), saveChars(), and ~IconvState().

◆ bufferLen

int QIconvCodec::IconvState::bufferLen

Definition at line 92 of file qiconvcodec_p.h.

Referenced by saveChars().

◆ cd

iconv_t QIconvCodec::IconvState::cd

◆ internalState

ConverterState QIconvCodec::IconvState::internalState

Definition at line 90 of file qiconvcodec_p.h.

Referenced by QIconvCodec::convertToUnicode().


The documentation for this class was generated from the following files: