List of all members.
Detailed Description
Definition at line 171 of file tinyxmlparser.cpp.
Constructor & Destructor Documentation
TiXmlParsingData::TiXmlParsingData |
( |
const char * |
start, |
|
|
int |
_tabsize, |
|
|
int |
row, |
|
|
int |
col |
|
) |
| [inline, private] |
Member Function Documentation
const TiXmlCursor& TiXmlParsingData::Cursor |
( |
| ) |
[inline] |
void TiXmlParsingData::Stamp |
( |
const char * |
now, |
|
|
TiXmlEncoding |
encoding |
|
) |
| |
Definition at line 196 of file tinyxmlparser.cpp.
{
assert( now );
if ( tabsize < 1 )
{
return;
}
int row = cursor.row;
int col = cursor.col;
const char* p = stamp;
assert( p );
while ( p < now )
{
const unsigned char* pU = (const unsigned char*)p;
switch (*pU) {
case 0:
return;
case '\r':
++row;
col = 0;
++p;
if (*p == '\n') {
++p;
}
break;
case '\n':
++row;
col = 0;
++p;
if (*p == '\r') {
++p;
}
break;
case '\t':
++p;
col = (col / tabsize + 1) * tabsize;
break;
case TIXML_UTF_LEAD_0:
if ( encoding == TIXML_ENCODING_UTF8 )
{
if ( *(p+1) && *(p+2) )
{
if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
p += 3;
else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
p += 3;
else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
p += 3;
else
{ p +=3; ++col; }
}
}
else
{
++p;
++col;
}
break;
default:
if ( encoding == TIXML_ENCODING_UTF8 )
{
int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)];
if ( step == 0 )
step = 1;
p += step;
++col;
}
else
{
++p;
++col;
}
break;
}
}
cursor.row = row;
cursor.col = col;
assert( cursor.row >= -1 );
assert( cursor.col >= -1 );
stamp = p;
assert( stamp );
}
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following file: