mirror of https://github.com/AxioDL/tinyxml2.git
WIP. syncing machines.
This commit is contained in:
parent
8ee79897c0
commit
857b868ca6
15
tinyxml2.cpp
15
tinyxml2.cpp
|
@ -608,6 +608,15 @@ const char* StringStack::Pop() {
|
||||||
|
|
||||||
XMLStreamer::XMLStreamer( FILE* file ) : fp( file ), depth( 0 ), elementJustOpened( false )
|
XMLStreamer::XMLStreamer( FILE* file ) : fp( file ), depth( 0 ), elementJustOpened( false )
|
||||||
{
|
{
|
||||||
|
for( int i=0; i<ENTITY_RANGE; ++i ) {
|
||||||
|
entityFlag[i] = false;
|
||||||
|
}
|
||||||
|
for( int i=0; i<NUM_ENTITIES; ++i ) {
|
||||||
|
TIXMLASSERT( entities[i].value < ENTITY_RANGE );
|
||||||
|
if ( entities[i].value < ENTITY_RANGE ) {
|
||||||
|
entityFlag[ entities[i].value ] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -619,6 +628,12 @@ void XMLStreamer::PrintSpace( int depth )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void XMLStreamer::PrintString( const char* )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void XMLStreamer::OpenElement( const char* name, bool textParent )
|
void XMLStreamer::OpenElement( const char* name, bool textParent )
|
||||||
{
|
{
|
||||||
if ( elementJustOpened ) {
|
if ( elementJustOpened ) {
|
||||||
|
|
|
@ -295,10 +295,15 @@ public:
|
||||||
private:
|
private:
|
||||||
void SealElement();
|
void SealElement();
|
||||||
void PrintSpace( int depth );
|
void PrintSpace( int depth );
|
||||||
|
void PrintString( const char* ); // prints out, after detecting entities.
|
||||||
|
|
||||||
FILE* fp;
|
FILE* fp;
|
||||||
int depth;
|
int depth;
|
||||||
bool elementJustOpened;
|
bool elementJustOpened;
|
||||||
|
enum {
|
||||||
|
ENTITY_RANGE = 64,
|
||||||
|
};
|
||||||
|
bool entityFlag[ENTITY_RANGE];
|
||||||
|
|
||||||
StringStack stack;
|
StringStack stack;
|
||||||
StringStack text;
|
StringStack text;
|
||||||
|
|
Loading…
Reference in New Issue